Coleman's .Net Nuggets

Little Nuggets from the .Net world.

  Home  |   Contact  |   Syndication    |   Login
  11 Posts | 0 Stories | 85 Comments | 1 Trackbacks

News

Tag Cloud


Article Categories

Archives

Image Galleries

Books

Documentation

Favorite Blogs

Favorite Sites

MSDN

Patterns

Programming

Resources

Tabbed Browing

Toolbox

Sunday, June 11, 2006 #

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. 

Regards
Coleman