Geeks With Blogs
Coleman's .Net Nuggets Little Nuggets from the .Net world.

As most developers these days, I try to do as much design as possible prior to diving into coding.  Typically, ever project consists of UML in one shape or another.  Usually the design takes shape with class, activity, and sequence diagrams.  Depending on your task or company’s documentation requirements, you may or may not model every state or behavior in every class you design.  Personally, I try to publish my public methods and properties since this is my API to the class.  Protected and private members tend to get less “public” attention and are only documented in code.  As I was working the other day in Visual Studio 2005, I stumbled upon a handy little nugget in the form of a smart tag.  I typed a non-existent private method that I wished to call in the scope of an existing method.  Studio wanted to know if I wanted to generate the method stub for the one I just made up.

What was I to do?  What would Bill Shatner do in a situation like this…?  I had to say YES.  What happened next was nothing short of a pleasant surprise.

The nice thing was that it picked up that the method needed to be declared static.  Additionally, it picked up the parameter type and return type.  Hitting (Shift + Alt + F10) is the shortcut to the smart tag. 


Posted on Sunday, June 11, 2006 8:11 PM | Back to top

Comments on this post: A Handy Method Stub Nugget in the Form of a Smart Tag

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Coleman | Powered by: