resharper fold if statement

// Before
if (x > 10) {
    // do something
}

// After
if (x > 10) { ... }
  1. Open the C++ file in the Visual Studio with ReSharper installed.
  2. Locate the if statement that you want to fold.
  3. Place the cursor on the if statement.
  4. Press the "-" key (minus key) or use the context menu to select "Code | Folding | Collapse".
  5. The if statement should now be folded into a single line.