Code Snippet Insertion - Where Documented

  • Thread starter Thread starter Gary Brown
  • Start date Start date
G

Gary Brown

Hi and Happy Holidays,

While typing in a member function an errant finger triggered a bit of code
snippet that throws a "not yet implemented" exception if the member is
called. It happened three times in two days but I haven't been able to
duplicate it purposely. Just what is the keying that does this and where is
it
documented? And is "Code Snippet Insertion" the correct term for this
mechanism?

Thanks,
Gary
 
Hi Gary,

If you type your method call before youve implemented your method

eg

string a = GetMyString();

youll notice that there is a little line appears under the first letter
(the same happens when you derive from an abstract class or interface)

Pressing ctrl + dot opens the menu and pressing enter will generate a
stub for your method whihc wil contain a not implemented exception.

There may be a faster way and if anyones knows Id be learn to learn of
it :-)

These are indeed snippets so I guess Code Snippet insertion is not a
bad term to use. As for the documentation Im not sure, I only found out
when someone at a seminar showed me

You can also invoke any of the other snippets by typing the name which
appears in the intellisense and then pressing the tab key

eg
ctor - for a constructor
prop (particularly useful) - for get and set properties
switch (if switching on an enum it will populate the case statements
for you) - for a switch statement

Hope this answers your question
 
Back
Top