📜  c# 获取文件扩展名 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:43.411000             🧑  作者: Mango

代码示例1
string myFilePath = @"C:\MyFile.txt";
string ext = Path.GetExtension(myFilePath);
// ext would be ".txt"