嵌套類 的英文怎麼說
中文拼音 [qiàntàolèi]
嵌套類
英文
nested class-
The accessibility of a nested type depends on its
嵌套類型的可訪問性取決於它的The nested class acts as a member variable of the class that contains it
嵌套類作為包含它的類的一個成員變量。Nested types, which are members of other types, can have declared accessibilities as indicated in the following table
嵌套類型是其他類型的成員,它們可以具有下表所示的聲明的可訪問性。If the type is a nested type, this property returns the enclosing type
對象。如果該類型是嵌套類型,則該屬性返回封閉類型。Nested types must have at least as many generic parameters as the enclosing type
嵌套類型擁有的泛型參數數目必須至少與封閉類型的一樣多。This allows the type parameters of enclosing types to be used in the member definitions of a nested type
這樣允許在嵌套類型的成員定義中使用封閉類型的類型參數。Generic parameters in a nested type correspond by position to the generic parameters in its enclosing type
嵌套類型中的泛型參數在位置上與其封閉類型中的泛型參數對應。For a generic nested class, use the mangled name that is, append a grave accent and the number of generic arguments
對于泛型嵌套類,使用改變后的名稱-即末尾附加了抑音符和泛型參數的數目。For a generic nested class, use the mangled name that is, append a grave accent and the number of generic parameters
對于泛型嵌套類,使用改變后的名稱-即末尾附加了抑音符和泛型參數的數目。A reference type that encapsulates data constants and fields and behavior methods, properties, indexers, events, operators, instance constructors, static constructors, and destructors, and can contain nested types
一種引用類型,它封裝數據和行為,並可以包含嵌套類型,其中數據包括常數和欄位,行為包括方法、屬性、索引器、事件、運算符、實例構造函數、靜態構造函數和析構函數。As the type of the private member data in the nested class
在嵌套類中作為私有成員數據的類型。Nested types in the same body can also access those private members
同一體中的嵌套類型也可以訪問那些私有成員。Because a nested type is treated as a member of the declaring type, the nested type has access to all other members in the declaring type
由於嵌套類型被視為是聲明類型的成員,因此嵌套類型可以訪問聲明類型中的所有其他成員。This includes code within a contained type, such as a nested class or an assignment expression in an enumeration
這些代碼包括所包含的類型中的代碼,如嵌套類或枚舉中的賦值表達式。Do use nested types when the relationship between the nested type and its outer type is such that member accessibility semantics are desirable
如果嵌套類型和其外部類型之間的關系需要成員可訪問性語義,則要使用嵌套類型。The only exception to this is when variables of the nested type need to be declared in rare scenarios such as subclassing or other advanced customization scenarios
唯一的特例是需要聲明嵌套類型的變量的情況,在生成子類或其他高級自定義等極少數情況下需要聲明嵌套類型的變量。The accessibility domain of a nested type is at least the program text of the type in which it is declared. that is, the type body, including any nested types
嵌套類型的可訪問域至少是聲明它的類型的程序文本,即包括任何嵌套類型的類型體。Property returns a fully qualified type name including nested types, the assembly name, and type arguments
可以返回完全限定的類型名稱(包括嵌套類型、程序集名稱和類型實參) 。Property returns a fully qualified type name including nested types, the assembly name, and generic type arguments
可以返回完全限定的類型名稱(包括嵌套類型、程序集名稱和泛型類型實參) 。In a well - designed library, developers should rarely have to use nested types to instantiate objects or declare variables
在設計完善的庫中,開發人員幾乎不需要使用嵌套類型實例化對象或聲明變量。分享友人