GetExtension file C#
Đã đăng
3 năm trước
string myFilePath = @"C:\MyFile.txt";
string ext = Path.GetExtension(myFilePath);
// ext would be ".txt"