2008年9月13日

System.Collections.Generic.List<>是System.Collections.ArrayList的泛型实现

摘要: System.Collections.Generic.List<>是System.Collections.ArrayList的泛型实现 阅读全文

posted @ 2008-09-13 20:53 优雅小猪 阅读(934) 评论(1) 推荐(0) 编辑

string.TrimEnd()在分割串中的利用

摘要: 经常用到在循环中,把若干个字符串用某个标记分割后连接起来,最后尾巴上往往还带有一个多于的分割符。去掉的方法很多。用String.TrimEnd('分割符')也是很方便的,并且也不用判断字符串的长度。和string.Split一样,参数char[]可以用'c'直接输入 阅读全文

posted @ 2008-09-13 15:30 优雅小猪 阅读(511) 评论(0) 推荐(0) 编辑

表驱动法(zz:http://www.cnblogs.com/shinn/archive/2008/04/16/1157141.html)

摘要: private static double[] rangeLimit = { 60.0, 75.0, 85.0, 95.0,100.0 };private static string[] grade = {"不合格", "合乎要求", "良好", "优秀" ,"卓越"};private static readonly int maxLevel = grade.Length - 1;public s... 阅读全文

posted @ 2008-09-13 12:07 优雅小猪 阅读(781) 评论(0) 推荐(0) 编辑

导航