System.IO.File.WriteAllText("@"+Environment.CurrentDirectory code example
Example: get current directory c# \
System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);