MethodBuilder.IsGenericMethodDefinition プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)

現在の MethodBuilder オブジェクトがジェネリック メソッドの定義を表している場合は true。それ以外の場合は false。

MethodBuilder を使用できるのは、ジェネリック メソッドの定義を作成する場合だけです。これを使用して、構築されたジェネリック メソッドを直接作成することはできません。ただし、MethodBuilder のサブクラスは、構築されたジェネリック メソッドを表す場合があります。

メソッドのステータスを表示するコード例を次に示します。このコードは、DefineGenericParameters メソッドのトピックで取り上げているコード例の一部分です。
' Use the IsGenericMethod property to find out if a ' dynamic method is generic, and IsGenericMethodDefinition ' to find out if it defines a generic method. Console.WriteLine("Is DemoMethod generic? {0}", _ demoMethod.IsGenericMethod) Console.WriteLine("Is DemoMethod a generic method definition? {0}", _ demoMethod.IsGenericMethodDefinition)
// Use the IsGenericMethod property to find out if a // dynamic method is generic, and IsGenericMethodDefinition // to find out if it defines a generic method. Console.WriteLine("Is DemoMethod generic? {0}", demoMethod.IsGenericMethod); Console.WriteLine("Is DemoMethod a generic method definition? {0}", demoMethod.IsGenericMethodDefinition);
// Use the IsGenericMethod property to find out if a // dynamic method is generic, and IsGenericMethodDefinition // to find out if it defines a generic method. Console::WriteLine("Is SampleMethod generic? {0}", sampleMethodBuilder->IsGenericMethod); Console::WriteLine( "Is SampleMethod a generic method definition? {0}", sampleMethodBuilder->IsGenericMethodDefinition);

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


Weblioに収録されているすべての辞書からMethodBuilder.IsGenericMethodDefinition プロパティを検索する場合は、下記のリンクをクリックしてください。

- MethodBuilder.IsGenericMethodDefinition プロパティのページへのリンク