G
genc ymeri
Hi,
How can I get the extention name of one file when I have a file list ?
Thanks.
How can I get the extention name of one file when I have a file list ?
Thanks.
Bob Boran said:here are 2 different options
-----------------------
string FilePath = "c:\\hello.exe";
// option 1
System.IO.FileInfo fi = new System.IO.FileInfo(FilePath);
this.textBox1.Text = fi.Extension ;
// option 2
this.textBox2.Text = FilePath.Substring(FilePath.LastIndexOf("."));