SyntaxFix
Write A Post
Hire A Developer
Questions
In addition, if you have a FileInfo fi, you can simply do:
FileInfo fi
string ext = fi.Extension;
and it'll hold the extension of the file (note: it will include the ., so a result of the above could be: .jpg .txt, and so on....
.
.jpg
.txt