How can I prevent the generated interface implementation from using an alias of type?

I am currently using Visual Studio (specifically 2012 Express). I have an interface already defined as follows:

interface IMyInterface
{
    public String Data { get; set; }
}

If I have an empty class:

class MyClass : IMyInterface
{
}

And I right click on it IMyInterface, I can select "Implementation Interface". When I do this, the automatically generated code creates the following:

class MyClass : IMyInterface
{
    public string Data
    {
        get
        {
            throw new NotImplementedException();
        }
        set
        {
            throw new NotImplementedException();
        }
    }
}

My question is, is there a way I could have the following auto-generations:

    public String Data

Instead:

    public String Data

?

+5
source share
1 answer

There is no way to do this. It is hardcoded to use built-in aliases where possible.

+1
source

All Articles