03 2015 档案

摘要:IComparable比较接口,继承此接口可对lis调用sort进行排序或者调用sort时可以为sort方法提供继承了IComparer的比较器 阅读全文
posted @ 2015-03-25 15:46 冯际成 阅读(131) 评论(0) 推荐(0) 编辑
摘要:在代码中经常遇到int?其实int?是Nullable的简写方式。int到int?转化int? i=null;int j=0;i=j;int?到int转化int? i=123;int j;if (i.HasValue){ j= i.Vaulue;}else{ j=0;}也可以int? i=123... 阅读全文
posted @ 2015-03-25 15:07 冯际成 阅读(159) 评论(0) 推荐(0) 编辑
摘要:1.转换者与被转换者之间有某些转换关系。2.转化者与被转换者之间有继承关系class FirstType{ public string Name{get;set;}}class SecondType{ public string Name{get;set;} public static ... 阅读全文
posted @ 2015-03-25 14:46 冯际成 阅读(130) 评论(0) 推荐(0) 编辑
摘要:当类使用System.Convert类进行转化时,System.Convert提供了一个将一个基元素转化为其他类型方法、 阅读全文
posted @ 2015-03-25 14:34 冯际成 阅读(92) 评论(0) 推荐(0) 编辑

返回顶部