Introduction | |
Language Elements | |
Always Use Properties Instead of Accessible Data Members | |
Prefer readonly to const | |
Prefer the is or as Operators to Casts | |
Use Conditional Attributes Instead of #if | |
Always Provide ToString() | |
Distinguish Between Value Types and Reference Types | |
Prefer Immutable Atomic Value Types | |
Ensure That 0 Is a Valid State for Value Types | |
Understand the Relationships Among ReferenceEquals(),static Equals(), instance Equals(), and operator== | |
Understand the Pitfalls of GetHashCode() | |
Prefer foreach Loops | |
NET Resource Management | |
Prefer Variable Initializers to Assignment Statements | |
Initialize Static Class Members with Static Constructors | |
Utilize Constructor Chaining | |
Utilize using and try/finally for Resource Cleanup | |
Minimize Garbage | |
Minimize Boxing and Unboxing | |
Implement the Standard Dispose Pattern | |
Expressing Designs with C# | |
Prefer Defining and Implementing Interfaces to Inheritance | |
Distinguish Between Implementing Interfaces and Overriding Virtual Functions | |
Express Callbacks with Delegates | |
Define Outgoing Interfaces with Events | |
Avoid Returning References to Internal Class Objects | |
Prefer Declarative to Imperative Programming | |
Prefer Serializable Types | |
Implement Ordering Relations with IComparable and Icompare | |
Table of Contents provided by Publisher. All Rights Reserved. |
The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.