foreach(DataRowView DRV in Dv_Source)
{
t = DRV.Row["realid"].ToString(); // realid=32 and other int type.
t += "|" + GetInfoById(System.Int32.Parse(t));
}public string GetInfoById(int/*System.Int32 这也试改过了*/ identity)
{
//todo function.
}错误提示:输入字符串的格式不正确?
{
t = DRV.Row["realid"].ToString(); // realid=32 and other int type.
t += "|" + GetInfoById(System.Int32.Parse(t));
}public string GetInfoById(int/*System.Int32 这也试改过了*/ identity)
{
//todo function.
}错误提示:输入字符串的格式不正确?
改成:
t += "|" + GetInfoById(Convert.ToInt32(t));
要确定 DRV.Row["realid"].ToString()得到的数据可以正确转化为int
我也在前面加了: if (t.equals("") || t==null) t=0;
{
t = DRV.Row["realid"].ToString(); // realid=32 and other int type.
t += "|" + GetInfoById(System.Int32.Parse(t)).ToString();
}
GetInfoById(int/*System.Int32*/ identity){}