Type.GetTypeFromHandle(RuntimeTypeHandle) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 형식 핸들에서 참조하는 형식을 가져옵니다.
public:
static Type ^ GetTypeFromHandle(RuntimeTypeHandle handle);
public 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
매개 변수
- handle
- RuntimeTypeHandle
형식을 참조하는 개체입니다.
반품
지정된 RuntimeTypeHandle형식에서 참조하는 형식이거나 null 속성이 Valuehandlenull.인 경우
예외
클래스 이니셜라이저가 호출되고 예외가 throw됩니다.
예제
다음 예제에서는 메서드를 GetTypeFromHandle 사용 하 여 제공 된 메서드에서 개체를 TypeRuntimeTypeHandle 가져옵니다GetTypeHandle.
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);
let myClass1 = MyClass1()
// Get the type referenced by the specified type handle.
let myClass1Type = Type.GetTypeFromHandle(Type.GetTypeHandle myClass1)
printfn $"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
설명
핸들은 가져온 애플리케이션 도메인에서만 유효합니다.