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 veya null
özelliği handle
ise Value türü.null
Özel durumlar
Sınıf başlatıcısı çağrılır ve bir özel durum oluşturulur.
Örnekler
Aşağıdaki örnek, yöntemi tarafından GetTypeHandle sağlanan öğesinden RuntimeTypeHandle bir Type nesnesi almak için yöntemini kullanırGetTypeFromHandle.
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);
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.
Şunlara uygulanır
Ayrıca bkz.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin