'How to make vscode act like Visual Studio IDE when pressing Enter within curly braces

Say I'm writing function:

img1

after I've pressed 'ENTER':

img2

after formatting:

enter image description here

Is it possible after second step (pressing 'ENTER') to get result like in Visual Studio IDE? This result:

enter image description here



Solution 1:[1]

You can download microsoft c# extension in visual studio for formatting c# codes. After download you can write your c# codes, then only right click inside of code file and click Format document.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1