Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 400
Svisstack Avatar asked Sep 15 '10 12:09

Svisstack


1 Answers

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:

  • Type "switch" in the IDE which will select the snippet in intellisense
  • Hit Tab to insert the snippet which will move the cursor inside the parens
  • Type the expression to switch on and hit Enter

This will expand out the known cases into the IDE.

like image 167
JaredPar Avatar answered Sep 22 '22 03:09

JaredPar