zoukankan      html  css  js  c++  java
  • Effective C# (2nd Edition)

    利用Ultra-Edit 32,配合Perl的正则表达式,很方便地把《Effective C#》第二版的目录截出来了,放在这儿随时提醒自己养成良好的习惯吧。书很不错,讲得很精细


    Item 1: Use Properties Instead of Accessible Data Members
    Item 2: Prefer readonly to const
    Item 3: Prefer the is or as Operators to Casts
    Item 4: Use Conditional Attributes Instead of #if
    Item 5: Always Provide ToString()
    Item 6: Understand the Relationships Among the Many Different Concepts of Equality
    Item 7: Understand the Pitfalls of GetHashCode()
    Item 8: Prefer Query Syntax to Loops
    Item 9: Avoid Conversion Operators in Your APIs
    Item 10: Use Optional Parameters to Minimize Method Overloads
    Item 11: Understand the Attraction of Small Functions
    Item 12: Prefer Member Initializers to Assignment Statements
    Item 13: Use Proper Initialization for Static Class Members
    Item 14: Minimize Duplicate Initialization Logic
    Item 15: Utilize using and try/finally for Resource Cleanup
    Item 16: Avoid Creating Unnecessary Objects
    Item 17: Implement the Standard Dispose Pattern
    Item 18: Distinguish Between Value Types and Reference Types
    Item 19: Ensure That 0 Is a Valid State for Value Types
    Item 20: Prefer Immutable Atomic Value Types
    Item 21: Limit Visibility of Your Types
    Item 22: Prefer Defining and Implementing Interfaces to Inheritance
    Item 23: Understand How Interface Methods Differ from Virtual Methods
    Item 24: Express Callbacks with Delegates
    Item 25: Implement the Event Pattern for Notifications
    Item 26: Avoid Returning References to Internal Class Objects
    Item 27: Prefer Making Your Types Serializable
    Item 28: Create Large-Grain Internet Service APIs
    Item 29: Support Generic Covariance and Contravariance
    Item 30: Prefer Overrides to Event Handlers
    Item 31: Implement Ordering Relations with IComparable<T> and IComparer<T>
    Item 32: Avoid ICloneable
    Item 33: Use the new Modifier Only to React to Base Class Updates
    Item 34: Avoid Overloading Methods Defined in Base Classes
    Item 35: Learn How PLINQ Implements Parallel Algorithms
    Item 36: Understand How to Use PLINQ for I/O Bound Operations
    Item 37: Construct Parallel Algorithms with Exceptions in Mind
    Item 38: Understand the Pros and Cons of Dynamic
    Item 39: Use Dynamic to Leverage the Runtime Type of Generic Type Parameters
    Item 40: Use Dynamic for Parameters That Receive Anonymous Types
    Item 41: Use DynamicObject or IDynamicMetaObjectProvider for Data-Driven Dynamic Types
    Item 42: Understand How to Make Use of the Expression API
    Item 43: Use Expressions to Transform Late Binding into Early Binding
    Item 44: Minimize Dynamic Objects in Public APIs
    Item 45: Minimize Boxing and Unboxing
    Item 46: Create Complete Application-Specific Exception Classes
    Item 47: Prefer the Strong Exception Guarantee
    Item 48: Prefer Safe Code
    Item 49: Prefer CLS-Compliant Assemblies
    Item 50: Prefer Smaller, Cohesive Assemblies


  • 相关阅读:
    HDU 1816, POJ 2723 Get Luffy Out(2-sat)
    [Transducer] Make an Into Helper to Remove Boilerplate and Simplify our Transduce API
    [ML] Daily Portfolio Statistics
    [Javascript] Transduce over any Iteratable Collection
    [Javascript] Improve Composition with the Compose Combinator
    [Mobx] Using mobx to isolate a React component state
    [Javascript] Simplify Creating Immutable Data Trees With Immer
    [React Native] Dismiss the Keyboard in React Native
    [CSSinJS] Convert Sass (SCSS) Styled Button to CSSinJS with JavaScript Templates and Variables
    [React Native] Use the SafeAreaView Component in React Native for iPhone X Compatibility
  • 原文地址:https://www.cnblogs.com/Abbey/p/2123312.html
Copyright © 2011-2022 走看看