Type.GetTypeFromHandle(RuntimeTypeHandle) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen tür tanıtıcısı tarafından başvuruda bulunan türü alır.
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
Parametreler
- handle
- RuntimeTypeHandle
Türüne başvuran nesne.
Döndürülenler
Belirtilen RuntimeTypeHandletarafından başvuruda bulunan tür veya nullValue özelliği handle ise.null
Özel durumlar
Sınıf başlatıcısı çağrılır ve bir özel durum oluşturur.
Örnekler
Aşağıdaki örnek, yöntemi tarafından GetTypeFromHandle sağlanan öğesinden Type bir RuntimeTypeHandle nesnesi almak için yöntemini kullanırGetTypeHandle.
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
Açıklamalar
Tanıtıcılar yalnızca elde edildikleri uygulama etki alanında geçerlidir.