且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

c#中没有文件扩展名的文件类型

更新时间:2022-01-11 22:12:24

参见: http://***.com/questions/58510/using -net-how-you-you-the-mime-type-of-a-file-on-the-file-signature / 58570#58570 [ ^ ]


请检查此...

http://***.com/questions/1437382/get-file-type-in​​-net [ ^ ]
please check this...
http://***.com/questions/1437382/get-file-type-in-net[^]


您好


看你可以用这个



Hi
see you can use this

string p = @"C:\Test.txt";
string e = Path.GetExtension(p);





结果:e =txt



Result : e= "txt"