用 String 类的 Format 静态方法:
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfSystemStringClassFormatTopic.htm如:
string str = String.Format("The sum of {0} and {1} is {2}",2,3,2+3);
将创建字符串"The sum of 2 and 3 is 5"。
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfSystemStringClassFormatTopic.htm如:
string str = String.Format("The sum of {0} and {1} is {2}",2,3,2+3);
将创建字符串"The sum of 2 and 3 is 5"。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货