RuntimeTypeHandle プロパティ
RuntimeTypeHandle メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 オーバーライドされます。 2 つの RuntimeTypeHandle 構造体が等しいかどうかを示します。 |
![]() | GetHashCode | オーバーライドされます。 現在のインスタンスのハッシュ コードを返します。 |
![]() | GetModuleHandle | 現在のインスタンスが表す型を格納しているモジュールへのハンドルを取得します。 |
![]() | GetObjectData | 現在のインスタンスが表す型を逆シリアル化するために必要なデータを SerializationInfo に設定します。 |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | op_Equality | オーバーロードされます。 オブジェクトと RuntimeTypeHandle 構造体が等しいかどうかを示します。 |
![]() | op_Inequality | オーバーロードされます。 オブジェクトと RuntimeTypeHandle 構造体が等しくないかどうかを示します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | このインスタンスの完全修飾型名を返します。 ( ValueType から継承されます。) |

RuntimeTypeHandle メンバ
RuntimeTypeHandle データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 オーバーライドされます。 2 つの RuntimeTypeHandle 構造体が等しいかどうかを示します。 |
![]() | GetHashCode | オーバーライドされます。 現在のインスタンスのハッシュ コードを返します。 |
![]() | GetModuleHandle | 現在のインスタンスが表す型を格納しているモジュールへのハンドルを取得します。 |
![]() | GetObjectData | 現在のインスタンスが表す型を逆シリアル化するために必要なデータを SerializationInfo に設定します。 |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | op_Equality | オーバーロードされます。 オブジェクトと RuntimeTypeHandle 構造体が等しいかどうかを示します。 |
![]() | op_Inequality | オーバーロードされます。 オブジェクトと RuntimeTypeHandle 構造体が等しくないかどうかを示します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | このインスタンスの完全修飾型名を返します。 (ValueType から継承されます。) |

RuntimeTypeHandle 構造体
アセンブリ: mscorlib (mscorlib.dll 内)

<SerializableAttribute> _ <ComVisibleAttribute(True)> _ Public Structure RuntimeTypeHandle Implements ISerializable
[SerializableAttribute] [ComVisibleAttribute(true)] public value class RuntimeTypeHandle : ISerializable

RuntimeTypeHandle を取得する方法を次の例に示します。
Imports System Imports System.Reflection _ Public Class MyClass1 Private x As Integer = 0 Public Function MyMethod() As Integer Return x End Function 'MyMethod End Class 'MyClass1 _ Public Class MyClass2 Public Shared Sub Main() Dim myClass1 As New MyClass1() ' Get the RuntimeTypeHandle from an object. Dim myRTHFromObject As RuntimeTypeHandle = Type.GetTypeHandle(myClass1) ' Get the RuntimeTypeHandle from a type. Dim myRTHFromType As RuntimeTypeHandle = GetType(MyClass1).TypeHandle Console.WriteLine("myRTHFromObject.Value: {0}", myRTHFromObject.Value) Console.WriteLine("myRTHFromObject.Type: {0}", myRTHFromObject.GetType()) Console.WriteLine("myRTHFromType.Value: {0}", myRTHFromType.Value) Console.WriteLine("myRTHFromType.Type: {0}", myRTHFromType.GetType()) End Sub 'Main End Class 'MyClass2
using System; using System.Reflection; public class MyClass1 { private int x=0; public int MyMethod() { return x; } } public class MyClass2 { public static void Main() { MyClass1 myClass1 = new MyClass1(); // Get the RuntimeTypeHandle from an object. RuntimeTypeHandle myRTHFromObject = Type.GetTypeHandle(myClass1); // Get the RuntimeTypeHandle from a type. RuntimeTypeHandle myRTHFromType = typeof(MyClass1).TypeHandle; Console.WriteLine("myRTHFromObject.Value: {0}", myRTHFromObject.Value); Console.WriteLine("myRTHFromObject.Type: {0}", myRTHFromObject.GetType()); Console.WriteLine("myRTHFromType.Value: {0}", myRTHFromType.Value); Console.WriteLine("myRTHFromType.Type: {0}", myRTHFromType.GetType()); } }
using namespace System; using namespace System::Reflection; public ref class MyClass1 { private: int x; public: int MyMethod() { return x; } }; int main() { MyClass1^ myClass1 = gcnew MyClass1; // Get the RuntimeTypeHandle from an object. RuntimeTypeHandle myRTHFromObject = Type::GetTypeHandle( myClass1 ); // Get the RuntimeTypeHandle from a type. RuntimeTypeHandle myRTHFromType = MyClass1::typeid->TypeHandle; Console::WriteLine( "myRTHFromObject.Value: {0}", myRTHFromObject.Value ); Console::WriteLine( "myRTHFromObject.Type: {0}", myRTHFromObject.GetType() ); Console::WriteLine( "myRTHFromType.Value: {0}", myRTHFromType.Value ); Console::WriteLine( "myRTHFromType.Type: {0}", myRTHFromType.GetType() ); }
import System.*; import System.Reflection.*; public class MyClass1 { private int x = 0; public int MyMethod() { return x; } //MyMethod } //MyClass1 public class MyClass2 { public static void main(String[] args) { MyClass1 myClass1 = new MyClass1(); // Get the RuntimeTypeHandle from an object. RuntimeTypeHandle myRTHFromObject = Type.GetTypeHandle(myClass1); // Get the RuntimeTypeHandle from a type. RuntimeTypeHandle myRTHFromType = (MyClass1.class.ToType()). get_TypeHandle(); Console.WriteLine("myRTHFromObject.Value: {0}", myRTHFromObject. get_Value()); Console.WriteLine("myRTHFromObject.Type: {0}", myRTHFromObject. GetType()); Console.WriteLine("myRTHFromType.Value: {0}", myRTHFromType. get_Value()); Console.WriteLine("myRTHFromType.Type: {0}", myRTHFromType. GetType()); }//main } //MyClass2


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- RuntimeTypeHandleのページへのリンク