MethodBuilder.IsGenericMethodDefinition Vlastnost

Definice

Získá hodnotu určující, zda aktuální MethodBuilder objekt představuje definici obecné metody.

public:
 virtual property bool IsGenericMethodDefinition { bool get(); };
public override bool IsGenericMethodDefinition { get; }
member this.IsGenericMethodDefinition : bool
Public Overrides ReadOnly Property IsGenericMethodDefinition As Boolean

Hodnota vlastnosti

true pokud aktuální MethodBuilder objekt představuje definici obecné metody; jinak, false.

Příklady

Následující příklad kódu zobrazí stav metody. Tento kód je součástí většího příkladu poskytnutého pro metodu 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)

Poznámky

Lze MethodBuilder použít pouze k vytvoření obecných definic metod; nelze jej použít k vytvoření vytvořené obecné metody přímo. Podtřída MethodBuilder však může představovat konstruovanou obecnou metodu.

Platí pro

Viz také