c# get execution directory code example Example: get execution directory c# string logsDirectory = Path.Combine(Environment.CurrentDirectory, "logs");