/// <summary>
/// 取得文件扩展名
/// </summary>
/// <param name="filename">文件名</param>
/// <returns>扩展名</returns>
public static string GetFileEXT(string filename)
{
if (string.IsNullOrEmpty(filename))
{
return "";
}
if (filename.IndexOf(@".") == -1)
{
return "";
}
int pos = -1;
if (!(filename.IndexOf(@"/") == -1))
{
pos = filename.LastIndexOf(@"/");
}
string[] s = filename.Substring(pos + 1).Split('.');
return s[1];
}