create a file in the directory of the exe and write to it csharp

Code Example - create a file in the directory of the exe and write to it csharp

                
                        string GuarnteedWritePath = System.Environment.
                             GetFolderPath(
                                 Environment.SpecialFolder.CommonApplicationData
                             );
            string FilePath = Path.Combine(GuarnteedWritePath, "LogFile.txt");