Any way to surround code block with Curly Braces {} in VS2008?

后端 未结 8 2081
-上瘾入骨i
-上瘾入骨i 2020-12-13 12:42

I always find myself needing to enclose a block of code in curly braces { }, but unfortunately that isn\'t included in the C# surround code snippets, which

8条回答
  •  攒了一身酷
    2020-12-13 13:18

    In ReSharper 4.5, curly braces are included as one of the built-in 'Surround Templates':

    1. Select the text that you want curly braces around.
    2. ReSharper -> Code -> Surround With... -> {}

      or

      ALT + R -> C -> S -> 7

      or

      Ctrl+E, U -> 7 (Visual Studio scheme)

      or

      Ctrl+Alt+J -> 7 (ReSharper 2.x/IDEA scheme)

提交回复
热议问题