what is a member vs. a property

后端 未结 9 2142
灰色年华
灰色年华 2020-12-15 03:39

A friend who is new to OO programming asked me the difference between a Member and Property, and I was ashamed to admit that I couldn\'t give him a good answer. Since proper

9条回答
  •  离开以前
    2020-12-15 04:24

    Properties is one kind of members.

    In C#, for example, a class can have the following members:

    • Constructors
    • Destructors
    • Constants
    • Fields
    • Methods
    • Properties
    • Indexers
    • Operators
    • Events
    • Delegates
    • Classes
    • Interfaces
    • Structs

    MSDN: C#: class

提交回复
热议问题