Type.GetTypeFromHandle(RuntimeTypeHandle) 메서드


지정된 형식 핸들이 참조하는 형식을 가져옵니다.Gets the type referenced by the specified type handle.

 static Type ^ GetTypeFromHandle(RuntimeTypeHandle handle);
public static Type GetTypeFromHandle (RuntimeTypeHandle handle);
static member GetTypeFromHandle : RuntimeTypeHandle -> Type
Public Shared Function GetTypeFromHandle (handle As RuntimeTypeHandle) As Type

매개 변수


형식을 참조하는 개체입니다.The object that refers to the type.



지정된 RuntimeTypeHandle에서 참조하는 형식이거나 nullValue 속성이 handle인 경우 null입니다.The type referenced by the specified RuntimeTypeHandle, or null if the Value property of handle is null.


클래스 이니셜라이저가 호출되고 예외를 throw합니다.A class initializer is invoked and throws an exception.


다음 예제에서는 메서드를 사용 하 여 GetTypeFromHandle 메서드에서 제공 하는 개체를 가져옵니다 Type RuntimeTypeHandle GetTypeHandle .The following example uses the GetTypeFromHandle method to get a Type object from a RuntimeTypeHandle provided by the GetTypeHandle method.

MyClass1^ myClass1 = gcnew MyClass1;
// Get the type referenced by the specified type handle.
Type^ myClass1Type = Type::GetTypeFromHandle( Type::GetTypeHandle( myClass1 ) );
Console::WriteLine( "The Names of the Attributes : {0}", myClass1Type->Attributes );
MyClass1 myClass1 = new MyClass1();
 // Get the type referenced by the specified type handle.
Type myClass1Type = Type.GetTypeFromHandle(Type.GetTypeHandle(myClass1));
Console.WriteLine("The Names of the Attributes :"+myClass1Type.Attributes);
   Dim myClass1 As New MyClass1()
   ' Get the type referenced by the specified type handle.
   Dim myClass1Type As Type = Type.GetTypeFromHandle(Type.GetTypeHandle(MyClass1))
   Console.WriteLine(("The Names of the Attributes :" + myClass1Type.Attributes.ToString()))
End Sub


핸들은는 가져온 애플리케이션 도메인 에서만 유효 합니다.The handles are valid only in the application domain in which they were obtained.

적용 대상

추가 정보