Objective C # Reading Notes,

Source: Internet
Author: User

Objective C # Reading Notes,

Effiective C # Item1: replace Member variables with attributes

Negative tive C # Item2: readonly is better than const)

Negative tive C # Item3: the operator as or is better than forced conversion

Negative tive C # Item4: Use the Conditional feature instead # if condition Compilation

Negative tive C # Item5: always provides the ToString () method

Valid tive C # Item6: usage scenarios for distinguishing value types and reference types

Negative tive C # Item7: implement the value type as constant and atomic as much as possible.

Valid tive C # Item8: Make sure that 0 is a valid value type

Negative tive C # Item9: understand the relationship between several equal judgments

Negative tive C # Item10: Understand the defects of the GetHashCode () method

Negative tive C # Item11: Use foreach loop statements first

Negative tive C # Item12: The variable initiator is superior to the value assignment statement.

Negative tive C # Item13: Use a static constructor to initialize static class members

Negative tive C # Item14: using the constructor chain

Negative tive C # Item15: Clear resources using and try/finally statements

Negative tive C # Item16: Minimize memory Spam

Negative tive C # Item17: Try to reduce packing and unpacking

Negative tive C # Item18: Standard Dispose Mode

Negative tive C # Item19: defines and implements interfaces that are better than inheritance types

Valid tive C # Item20: discerning interface implementation and virtual method Rewriting

Negative tive C # Item21: Delegate expression callback

Negative tive C # Item22: Use the event-defined outbound Interface

Negative tive C # Item23: avoid returning references to internal class objects

Declarative C # Item24: Declarative Programming is better than imperative Programming

Negative tive C # Item25: implement the type as serializable as much as possible

Negative tive C # Item26: Use the IComarable and IComparer interfaces for sorting

Negative tive C # Item27: avoids the ICloneable Interface

Negative tive C # Item28: avoid forced type conversion

Negative tive C # Item29: The new modifier is considered only when the new base class is faulty.

Valid C #: Create a binary component

Negative tive C # Item30: CLS compatible assembly as much as possible

Negative tive C # Item31: implement short and concise methods as much as possible

Proactive C # Item32: small and highly cohesive assembly as much as possible

Valid tive C # Item33: restrict the visibility of Types

Proactive C # Item34: create a large-granularity Web API

Negative tive C # Item35: overwrite is better than event Processor

Negative tive C # Item36: diagnosis when using. NET properly

Valid tive C # Item37: use the standard configuration Mechanism

Custom tive C # Item38: customizes and supports data binding

Valid tive C # Item39: use. NET for verification

Valid tive C # Item40: select an appropriate set as needed

Valid tive C # Item41: DataSet is better than custom Structure

Negative tive C # Item42: simplify reflection with features

Negative tive C # Item43: avoid excessive reflection usage

Valid tive C # Item44: creates a specific exception class for the Application

Proactive C # Item45: security assurance with strong exceptions preferred

Proactive C # Item46: Minimize interoperability

Valid tive C # Item47: Select security code

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.