嵌套類型 的英文怎麼說
中文拼音 [qiàntàolèixíng]
嵌套類型
英文
nested type-
The accessibility of a nested type depends on its
嵌套類型的可訪問性取決於它的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
嵌套類型中的泛型參數在位置上與其封閉類型中的泛型參數對應。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
一種引用類型,它封裝數據和行為,並可以包含嵌套類型,其中數據包括常數和欄位,行為包括方法、屬性、索引器、事件、運算符、實例構造函數、靜態構造函數和析構函數。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
由於嵌套類型被視為是聲明類型的成員,因此嵌套類型可以訪問聲明類型中的所有其他成員。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
在設計完善的庫中,開發人員幾乎不需要使用嵌套類型實例化對象或聲明變量。Ideally, a nested type is instantiated and used only by its declaring type
理想情況下,嵌套類型僅由它的聲明類型進行實例化和使用。The nested, or inner type can access the containing, or outer type
嵌套類型(或內部類型)可訪問包含類型(或外部類型) 。Regardless of whether the outer types is a class or a struct, nested types default to
不管外部類型是類還是結構,嵌套類型均默認為It is important to note that the type argument count can be found within a nested type name, in which case it is followed by a plus sign
請務必注意類型參數計數可能位於嵌套類型名稱中,這種情況下它後面帶有一個加號( " + " ) 。When overridden in a derived class, searches for the specified nested type, using the specified binding constraints
當在派生類中重寫時,使用指定綁定約束搜索指定嵌套類型。分享友人