The requested page is not available for the requested platform. You are viewing the content for Default platform.

Create Implementer (Implicit) (C#)

Creates a class implicitly implementing a current interface. Selects the contents of the last generated implementor member and drops the marker onto the interface declaration.

Notes

  • This code provider is similar to Create Implementer (Explicit) (C#). The difference is that Create Implementer (Implicit) (C#) does not include interface references in declarations of implementer class members.

Availability

From the context menus or via shortcuts:

  • when the edit cursor or caret is on an interface name within an interface declaration.

Example

interface IMyInterface
{
    int TestMethod1(int a);
    string TestMethod2(string a);
}

Result:

private class IMyInterfaceImplementer : IMyInterface
{
    public IMyInterfaceImplementer()
    {
        throw new NotImplementedException();
    }
    public int TestMethod1(int a)
    {
        throw new NotImplementedException();
    }
    public string TestMethod2(string a)
    {throw new NotImplementedException();
    }
}
interface IMyInterface
{
    int TestMethod1(int a);
    string TestMethod2(string a);
}