获取路径的名称和后缀

string fileName = Path.GetFileNameWithoutExtension(fileName);
string dot = Path.GetExtension(fileName).ToLower();//后缀
原文地址:https://www.cnblogs.com/tianxiang2046/p/2699634.html