This repo contains a simple console app that demonstrates several codefixes and refactorings in recent Visual Studio versions.
- Clone the repo and follow the comments in the code.
- The editorconfig was generated with the Intellicode extension for Visual Studio. I highly recommend it!
- Check out the Visual Studio Productivity guide for more features!
- Move Type to Namespace (Ctrl + .)
- Run code cleanup on solution/projects from Solution Explorer (Right-click)
- Toggle block comments (Ctrl + Shift + /)
- Initialize a private field from constructor and vice versa (Ctrl + .)
- Make readonly struct fields writable (Ctrl + .)
- Split/Merge nested if statements (Ctrl + .)
- Regex Completion (Ctrl + space)
- Wrap binary expressions (Ctrl + .)
- Find All References 'Kind' column values for Namespaces and Types
- Code fix to unseal a class (Ctrl + .)
- New Roslyn classification colorization!
- Wrap, indent, align parameters (Ctrl + .)
- Use expression/block body for lambda (Ctrl + .)
- Invert conditional expressions and logical operations (Ctrl + .)
- Convert to compound assignment (Ctrl + .)
- Implicitly-typed variables cannot be constant code fix (Ctrl + .)
- Replace
@$"
with$@"
when typing interpolated verbatim string (automatic) - Categorize references by Read/Write in Find All References window (Shift + F12)
- Automatically close block comment on "/" (automatic)
- Open a csproj by double-clicking on a project in solution explorer (.NET Core only)
- Fix for identified unused expression values and parameters (Ctrl + .)
- Allow Extract Interface to remain in same file (Ctrl R, Ctrl I)
- Pull members up refactoring with dialog options (Ctrl + .)
- Regex parsing support
- Foreach to LINQ query (Ctrl + .)
- Foreach to LINQ method/call form (Ctrl + .)
- Add missing usings on copy paste (Ctrl + .)
- Dead code analysis for unused private members (Ctrl + .)
- Add implied await code fix (Ctrl + .)
- Convert local function to method (Ctrl + .)
- Generate deconstructor (Ctrl + .)
- Convert anonymous type to tuple (Ctrl + .)
- Convert anonymous type to class (Ctrl + .)
- Format Document (Ctrl + k, d)
- Code clean-up (Ctrl + k, Ctrl + e)
- Invert if (Ctrl + .)
- Multi-caret (Ctrl + alt + click)
- Convert to conditional expression (Ctrl + .)
- Add parameter at callsite (Ctrl + .)
- Erase extra parenthesis (Ctrl + .)
- For loop to foreach (Ctrl + .)
- Linq to ForEach (Ctrl + .)
- Navigate to Enclosing Block (Shift + Alt + [)
- Go to All Recent Files (Ctrl + t, r)