I was typing a switch with an enum in VS 2013 and all case statements filled out automatically after I finished the switch. Now I can\'t repeat it. I was not hallucinating,
VS 2019 + resharper create an empty switch with your variable. Click on first curly bracket "{" Then press alt + enter You will see Generate switch labels. Screenshot below:
I think what you need is this:
sw(tab)(tab)enumVariableName(tab)(downArrow)
I tested it and works ( in VS2013 at least).
Visual studio 2017, 2019 - without Resharper:
1) write "switch"
2) press two times TAB, then you will see:
switch (switch_on)
{
default:
}
(the switch_on is highlited)
3) retype switch_on
to your enum variable or type
4) press ENTER or click somewhere else (pressing TAB does not work), now you should see all the enum items filled:
switch (YOUR_ENUM_VARIABLE_OR_TYPE)
{
case YOUR_ENUM_TYPE.Item1:
break;
case YOUR_ENUM_TYPE.Item2:
break;
case YOUR_ENUM_TYPE.Item3:
break;
default:
break;
}