|The FileDilaog classes only allow the user to select a path, they don't actually do anything with files.
An easy way to actually write or open a file is using the
Filename property of the
SaveFileDialog and save that in a
Then you use
File.ReadAllText() method to read a file and
File.WriteAllText() method to write the text to a file.
These work even without giving the user a possibility to specify the location or name of the file.
Both methods have a string parameter called
path, that's where you can put the path you just got from the FileDialogs (or a fixed path).
modified on Thursday, February 26, 2009 8:11 AM