© 2026 Hedgehog Software, LLC
private void button1_Click(object sender, EventArgs e) { try { string baseDir = AppDomain.CurrentDomain.BaseDirectory; string currentDirectory = Directory.GetCurrentDirectory(); string filePath = Path.Combine(currentDirectory, "Dialog.txt"); MessageBox.Show(filePath); using (StreamWriter writer = new StreamWriter(filePath)) { writer.Write("Yes"); } } catch (Exception ex) { MessageBox.Show($"{ex}"); } this.Close(); }
C:\Users\Confidential\source\repos\Toad Editor\Toad Editor\File Selector\Dialog.txt
C:\Users\Confidential\source\repos\Toad Editor\Toad Editor\bin\Debug\net8.0-windows\Dialog.txt