Switch enum auto-fill

后端 未结 9 2094
故里飘歌
故里飘歌 2020-12-24 00:23

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,

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-24 00:50

    By default, Visual Studion's snippet works correct. You should type "sw" and then press double "Tab".

    If you use Resharper, the snippet doesn't work, because Resharper's snippet has more priority, by default. So, you should turn off resharper's snippet.

    Go to "Resharper" -> "Template Explorer"-> "C#" then uncheck "switch". Try "sw" + double "Tab"

提交回复
热议问题