Partilhar via


IMethodSymbol.AssociatedExtensionImplementation Property

Definition

For a method/accessor/operator in an extension block, returns the corresponding implementation method if one exists. Returns null otherwise.

For example, considering:

static class E
{
    extension(int i)
    {
        public void M() { }
    }
}

When given the method symbol for E.extension(int i).M(), it will return the corresponding static implementation method E.M(this int i).

public Microsoft.CodeAnalysis.IMethodSymbol? AssociatedExtensionImplementation { get; }
member this.AssociatedExtensionImplementation : Microsoft.CodeAnalysis.IMethodSymbol
Public ReadOnly Property AssociatedExtensionImplementation As IMethodSymbol

Property Value

Applies to