Effective C#
第一章 C#语言元素
项1:总是使用属性,不要使用可访问的数据成员
项2:常数项尽量使用readonly,而不是const
项3:类型装换时,不要使用强制转换,使用操作符is或者as
项4:使用Conditional标记代替#if条件编译
项5:给你建立的每个类写一个ToString()函数
项6:搞清楚值类型和引用类型的区别
项7:尽量选择不可变基础类型
项8:对于值类型保证0值代表一个有效的状态
项9:理解ReferenceEquals()、静态Equals()、实例Equals()以及==操作符之间的区别
项10:理解GetHashCode()的缺陷
项11:尽量使用foreach循环
分享到:
相关推荐
Effective C# - 50 Specific Ways to Improve Your C# - Bill Wagner (2004)
effective-go-zh-en-gitbooke
Effective C#中文版PDF 好书不多说哦!
Effective C# 中文版改善C#程序的50种方法
Effective C# 中文版,改善C#程序的50种方法
[Addison-Wesley Professional] More Effective C# 改善C#程序的50种方法 (英文版) [Addison-Wesley Professional] More Effective C# 50 Specific Ways to Improve Your C# (E-Book) ☆ 图书概要:☆ In More ...
[Addison-Wesley Professional] Effective C# 改善C#程序的50种方法 第1版 (英文版) [Addison-Wesley Professional] Effective C# 50 Specific Ways to Improve Your C# 1st Edition (E-Book) ☆ 图书概要:☆ C#...
More Effective C# is one of those rare books that doesn't just regurgitate syntax, but teaches you how to use the C# language.' -Peter Ritchie, Microsoft MVP: Visual C# 'More Effective C# is a great ...
effective-go-zh-en.pdf
Effective C# SecondEdition
effective c# from Bill
In Effective C#, Second Edition, respected .NET expert Bill Wagner identifies fifty ways you can leverage the full power of the C# 4.0 language to express your designs concisely and clearly. ...
Effective C# 中文版
Effective C#
Effective C# (Covers C# 4.0) 50 Specific Ways to Improve Your C# 2nd Edition
Effective C#: 50 Specific Ways to Improve Your C#
More Effective C#中文版,清晰版
Effective C# 50 Specific Ways to Improve Your C#