C# file system in Off Topic
|
|
I've been trying and searching for days on how to make a file system so when you click a button it opens up a window and lets you select a file of a certain type. Also after I've selected the file I want to use and the path is set and I click ok, how would I get C# to tell which file type it is?
|
As for the extension, you have to get the path of the file from the File object returned from the dialog, and do:
extension = path_string.SubString(path_string.lastIndexOf(".txt"));
That should answer your questions.
I would give you more specific terminology, but I've only had web development on the brain for the past two or three months so I'd need a refresher on C# first.