TypeDefinition.GetDeclaringType 方法

定義

傳回指定巢狀型別的封入型別。Returns the enclosing type of a specified nested type.

public:
 System::Reflection::Metadata::TypeDefinitionHandle GetDeclaringType();
public System.Reflection.Metadata.TypeDefinitionHandle GetDeclaringType ();
member this.GetDeclaringType : unit -> System.Reflection.Metadata.TypeDefinitionHandle
Public Function GetDeclaringType () As TypeDefinitionHandle

傳回

指定巢狀型別的封入型別,或型別不是巢狀時,其 IsNil 屬性為 true 的控制代碼。The enclosing type of the specified nested type, or a handle a handle whose IsNil property is true if the type is not nested.

適用於