Originale-mail to me for new edition

 

Interface properties

 

Properties declared in an interface are accessible only through expressions of the interface type; they cannot be accessed through class-type variables. Moreover, interface properties are visible only within programs where the interface is compiled. For example, on Windows, COM objects do not have properties.

In an interface, property read and write specifiers must be methods, since fields are not available.

 

Topic groups

 

See also

Interface types: Overview

Object interfaces: Overview

Property access

 

 

译文

 

接口属性

 

在接口声明中,只有通过接口类型表达式声明的属性是可访问的;这些属性不能通过类类型变量被访问。此外,接口属性仅在接口被编译的程序中是可见的。例如,在Windows中,COM对象没有属性。

在接口中,属性的readwrite说明符必须是方法,因为域是不可用的。

 

主题组

 

相关主题

接口类型:概述

对象接口:概述

属性访问