MethodBuilder.IsGenericMethodDefinition 속성

정의

현재 MethodBuilder 개체가 제네릭 메서드의 정의를 나타내는지 여부를 표시하는 값을 가져옵니다.

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

속성 값

현재true 개체가 제네릭 메서드 정의를 나타내면 MethodBuilder 이고, 그렇지 않으면 false입니다.

예제

다음 코드 예제에서는 메서드의 상태 표시 합니다. 이 코드는 메서드에 제공된 더 큰 예제의 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 SampleMethod generic? {0}",
    sampleMethodBuilder->IsGenericMethod);
Console::WriteLine(
    "Is SampleMethod a generic method definition? {0}",
    sampleMethodBuilder->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 DemoMethod generic? {0}", _
    demoMethod.IsGenericMethod)
Console.WriteLine("Is DemoMethod a generic method definition? {0}", _
    demoMethod.IsGenericMethodDefinition)

설명

MethodBuilder 제네릭 메서드 정의를 만드는 데만 사용할 수 있습니다. 생성된 제네릭 메서드를 직접 만드는 데는 사용할 수 없습니다. 그러나 의 MethodBuilder 하위 클래스는 생성된 제네릭 메서드를 나타낼 수 있습니다.

적용 대상

추가 정보