Jackyfei
上一页 1 ··· 5 6 7 8 9
摘要: (一)params---------可以让参数随意变化的关键字 1 staticvoid Main(string[] args) 2 { 3 TestParams(1, 2, 3); 4 TestParams(1, 2, 3, 4, 5, 6);//注意参数随意变换 5 6 TestParams2(1, "a", "b", 12, 52, 16); 7 8 Console.ReadLine(); 9 }10 11 staticvoid TestParams(paramsint[] list)12 {13 string str =string.Empty; 阅读全文
posted @ 2011-03-10 21:49 张飞洪[厦门] 阅读(616) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { TestString(); TestStringBuilder(); } public static void TestString() { DateTime startTime = DateTime.Now; string str = string.Empty; for (int i = 0; i < 10000; i++)// 一万次 { str += "a"; } DateTime endTime = DateTime.Now; TimeSpan timeSpan = endTime - sta 阅读全文
posted @ 2011-03-10 21:07 张飞洪[厦门] 阅读(955) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9