Visual studio 2010 Switch statement generation by enum

后端 未结 3 1499
失恋的感觉
失恋的感觉 2021-02-18 15:38

Is there any way to get generation of switch statements by enum?

For example if I have big enum and I have method with has parameter enum, then I need to code switch sta

3条回答
  •  执念已碎
    2021-02-18 16:13

    Tried messing with both of the above answers and couldn't get it to work for me. The big difference I found is that you have to double tap Tab after you start typing switch.

    A single tab will complete the switch statement but won't open up parentheses. By double tapping it will open up paratheses and leave your cursor in the middle, so when you start typing the enum variable and tab to autocomplete it, you will generate all of the switch statements.

提交回复
热议问题