FileDialog of C#...

Jul 26 2010 4:46 PM


Hello. I am working on a GUI that will write the contents of a listbox to a text file. After writing the last item, a saveFileDialog pops up. Then you can type in the name of the file and continue to save it to the desired location. My question is how can I access the name of the file I type in to save it to a variable?

Ex. I type in "testerFile" to save as the filename. How do I access that from the dialog textbox to save it to a global string?
 

Answers (5)