Path.GetExtension这个方法有获取 “.” //.MP3
string strEx = "XXXXXX.amr";
string fileType = System.IO.Path.GetExtension(strEx);
if (!string.IsNullOrEmpty(fileType))//如果扩展名不为空,
{
strEx = strEx.Replace(fileType, ".mp3");
}
string strEx = "XXXXXX.amr";
string fileType = System.IO.Path.GetExtension(strEx);
if (!string.IsNullOrEmpty(fileType))//如果扩展名不为空,
{
strEx = strEx.Replace(fileType, ".mp3");
}