Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

Visual Studio Addins

I've been working with Visual Studio.Net for a little while.  It's a really nice environment, but it seems to fall short in some places.  For instance, I'd like to inherit from an abstract class and have a tool that allows me to generate code stubs for some or all of the inherited abstract methods.  Similarly, when I implement an interface, I'd like a tool to help me generate the required code stubs.  If studio does this already, I haven't been able to figure it out.  Can anyone recommend any good addins for this kind of thing?  I don't mind writing my own, but I'd rather use someone else's work (including paying for the privilege, of course), if possible.  Thanks in advance for the advice.

.NET newb
Monday, December 22, 2003 might be what you're looking for.

Mike Gunderloy
Monday, December 22, 2003

"Similarly, when I implement an interface, I'd like a tool to help me generate the required code stubs"

My copy of VSNet 2003 (VB side) does this already. When you type Implements ISampleInterface and press enter, all the methods defined in the interface are automatically created for you as empty stubs inside the current class.

Sanjay Sheth
Monday, December 22, 2003

and if it doesn't do it automatically (i've seen this happen), the class explorer has a menu item to generate the stubs.

Monday, December 22, 2003

Thanks folks.  Definitely a move in the right direction.

.NET newb
Tuesday, December 23, 2003

Add a class to you project that inherits from the desired interface.  Use the 'Class View' window and navigate your way to class you just added.  Expand the class, then expand the 'Bases and Interfaces' node.  This will present you with a list of classes/interfaces your class inherits from.  Right mouse click on the interface you'd like to add stubs for.  The context menu that pops up will have an 'Add' menu item which in turn will have an 'Implement Interface' menu.

THe process for adding 'override' stubs for virtual methods is similar, except it is on a method-by-method basis.

Hope this helps,

Len Weaver
Tuesday, December 30, 2003

*  Recent Topics

*  Fog Creek Home