5

I'm 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 the IMyInterface, I can select "Implement Interface". When I do this, the auto-generated code produces the following:

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

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

    public String Data

Instead of:

    public string Data

?

4

1 に答える 1

1

これを行う方法はありません。可能な場合は、組み込みのエイリアスを使用するようにハードコーディングされています。

于 2013-04-23T04:35:18.000 に答える