Inserting snippets in VB.

Sara Ford writes about inserting snippets in VB and C#.  Unfortunately, Sara hasn’t got it quite right.  In VB 2008 the statement completion window does NOT show snippet shortcuts.  It only shows namespaces, types, members and keywords.  It just happens that many of VB’s keywords are also snippet shortcuts.

In VB 2005 you could type the shortcut  and press tab.  In VB 2008 however the code completion window gets first preference, so if you type the shortcut and press tab, and that shortcut happens to be the first part of any name in the code completion window (namespace, type, member or keyword), then you will not get your snippet instead you’ll get the match from the code completion window.  You’ve got a couple of choices to actually get your snippet inserted.  You can press Esc then the tab. That will close the code completion window, then your snippet is the only match.  The other way is to type the shortcut or part there-of followed by a ?  This will bring up the snippet shortcut list.

e.g type  app?