views:

41

answers:

1

Is it possible to change the stub used to implement interfaces in Visual Studio 2008?

For instance, when I choose either
Implement interface 'IMyInterface'
or
Explicitly implement interface 'IMyInterface'

Instead of a number of properties that look like this:

    public string Comment
    {
        get
        {
            throw new NotImplementedException();
        }
        set
        {
            throw new NotImplementedException();
        }
    }

I'd like my properties to use the C# 3.0 auto-implemented properties and look like this:

    public string Comment {get;set;}

I want to do this to avoid forcing this interface to be an abstract class.

I've looked through the snippets in the Visual Studio folder, but I didn't see any that would be appropriate. I've also googled and searched SO, and found nothing.

If this isn't possible, does anyone have a macro I can steal?

Thanks.

edit: I have tried editing the snippets located in C:\Program Files\Microsoft Visual Studio 9.0\VC#\Snippets\1033\Refactoring but these changes don't change the implementation. I've tried making the changes, then reopening Visual Studio, which doesn't work. Am I doing something wrong here?

A: 

It looks like ReSharper may be the only way for me to go about this.

Jim Schubert