visual-studiovisual-studio-2010keyboard-shortcutsswitch-statement

Shortcut in Visual Studio 2010 to generate all possible Case's in Switch


I can't find key binding to expand all possible cases in switch, eg. have switch with enum argument, in Borland C++ i doing this with TAB key while switch code is selected.

I want to do this in Visual Studio 2010.

Can anyone help me?


Solution

  • It C++ it's not possible to do this. The IDE just doesn't have support for that operation.

    In C# you can do this with the switch code snippet:

    This will expand out the known cases into the IDE.