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

このメソッドがジェネリック メソッドの場合は true。それ以外の場合は false。

メソッドに型パラメータが含まれている場合、そのメソッドはジェネリック メソッドです。DefineGenericParameters メソッドを呼び出してメソッドをジェネリックにすると、型パラメータを追加できます。この変更を元に戻すことはできません。

メソッドのステータスを表示するコード例を次に示します。このコードは、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.IsGenericMethod プロパティを検索する場合は、下記のリンクをクリックしてください。

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