temp.Trim("\0".ToCharArray()); //去掉字符串中的字符'\0',temp为字符串
//得到文件名称
public string getName(string FullPath)
{
string[] tempTxtScreenicPath = imgFullPath.Split('\\');
string txtPicPath = tempTxtScreenicPath[tempTxtScreenicPath.Length - 1];
return txtPicPath;
}