第一个问题:把"000008"转换成长整形:
long.Parse("000008");第二个问题:把长整形转换成字符串:
string format(long lNum,string strFormat)
{//假设为0000之类转换
string strTemp=lNum.ToString();
if(strTemp.Length<strFormat.Length)
strTemp=strFormat.SubString(0,strFormat.Length-strTemp.Length)+strTemp;
return strTemp;
}
long.Parse("000008");第二个问题:把长整形转换成字符串:
string format(long lNum,string strFormat)
{//假设为0000之类转换
string strTemp=lNum.ToString();
if(strTemp.Length<strFormat.Length)
strTemp=strFormat.SubString(0,strFormat.Length-strTemp.Length)+strTemp;
return strTemp;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货