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.
- Check out the Visual Studio for Mac Tour for more features!
- Extract local function (Alt + enter)
- Simplify interpolated string (Alt + enter)
- Completion for unimported types and extension methods (Ctrl + space)
- Convert if statement to switch statement or expression (Alt + enter)
- Make method static (Alt + enter)
- Configure severity level of a code style rule directly through the editor
- Add null checks for all parameters
- Go to Base (Alt + Home)
- Make a local function static (Alt + enter)
- Pass variable explicitly in local static function (Alt + enter)
- Convert switch statement to switch expresssion (Alt + enter)
- Generate parameter (Alt + enter)
- Toggle single line comments (⌘/)
- Make readonly struct fields writable (Alt + enter)
- Split/Merge nested if statements (Alt + enter)
- Regex Completion (Ctrl + space)
- Wrap binary expressions (Alt + enter)
- Code fix to unseal a class (Alt + enter)
- Wrap, indent, align parameters (Alt + enter)
- Use expression/block body for lambda (Alt + enter)
- Invert conditional expressions and logical operations (Alt + enter)
- Convert to compound assignment (Alt + enter)
- Implicitly-typed variables cannot be constant code fix (Alt + enter)
- Replace
@$"
with$@"
when typing interpolated verbatim string (automatic) - Automatically close block comment on "/" (automatic)
- Fix for identified unused expression values and parameters (Alt + enter)
- Pull members up refactoring (Alt + enter)
- Foreach to LINQ query (Alt + enter)
- Foreach to LINQ method/call form (Alt + enter)
- Dead code analysis for unused private members (Alt + enter)
- Add implied await code fix (Alt + enter)
- Convert local function to method (Alt + enter)
- Generate deconstructor (Alt + enter)
- Convert anonymous type to tuple (Alt + enter)
- Convert anonymous type to class (Alt + enter)
- Invert if (Alt + enter)
- Multi-caret (Ctrl + alt + click)
- Convert to conditional expression (Alt + enter)
- Add parameter at callsite (Alt + enter)
- Erase extra parenthesis (Alt + enter)
- For loop to foreach (Alt + enter)
- Linq to ForEach (Alt + enter)