17.6.1 Static and instance properties
来源:互联网 发布:python怎么写爬虫 编辑:程序博客网 时间:2024/04/24 10:27
When a property declaration includes a static modifier, the property is said
to be a static property. When no
static modifier is present, the property is said to be an instance property.
A static property is not associated with a specific instance, and it is a
compile-time error to refer to this in the
accessors of a static property.
An instance property is associated with a given instance of a class, and
that instance can be accessed as this
(§14.5.7) in the accessors of that property.
When a property is referenced in a member-access (§14.5.4) of the form
E.M, if M is a static property, E must
denote a type that has a property M, and if M is an instance property, E
must denote an instance having a
property M.
The differences between static and instance members are discussed further
in §17.2.5.
to be a static property. When no
static modifier is present, the property is said to be an instance property.
A static property is not associated with a specific instance, and it is a
compile-time error to refer to this in the
accessors of a static property.
An instance property is associated with a given instance of a class, and
that instance can be accessed as this
(§14.5.7) in the accessors of that property.
When a property is referenced in a member-access (§14.5.4) of the form
E.M, if M is a static property, E must
denote a type that has a property M, and if M is an instance property, E
must denote an instance having a
property M.
The differences between static and instance members are discussed further
in §17.2.5.
- 17.6.1 Static and instance properties
- 17.6.1 Static and instance properties
- 17.5.2 Static and instance methods
- 17.5.2 Static and instance methods
- 17.7.3 Static and instance events
- Properties vs instance variables
- Effective C# 9:nderstand the Relationships Among ReferenceEquals(), static Equals(), instance Equals(), and operator==
- NDK/JNI Develop guide(6) access the instance variables and static variables
- Defining Database and Instance
- Properties vs. instance variables(ios objective-c)
- Understanding Instance and Class Members
- Initializing Instance and Class Members
- JavaScript的Static Variable和Instance Property
- oracle database and instance and oracle SID
- Properties, methods and events
- Attributes and custom properties
- Properties and Outlets
- ECMAScript5 Objects and Properties
- 17.5.8 Method body
- 在ASP中用集合成批操作数据库 (转)
- 17.5.9 Method overloading
- 17.6 Properties
- 使用ASP生成HTML文件
- 17.6.1 Static and instance properties
- 17.6.2 Accessors
- SQL Server 数据库管理常用的SQL和T-SQL语句
- 17.6.3 Virtual, sealed, override, and abstrac
- SQL注射总结
- 使用XmlHttp结合ASP实现网页的异步调用
- tomcat 配置 备忘(转自满江红及其他站点)
- 为了更明确的生活,需要计划
- 深刻剖析经典面试题之一:堆和栈的区别