Setting Opened Curly Parenthesis to Automatically Up
If you want the opening curly braces to be on the same line as the if, loop, method, class.. written in Visual Studio and to be automated, the following steps should be followed.
- 1 - "Tools" opens.
- 2 - "Options" opens.
- 3 - "Text Editor" opens.
- 4 - Choose C# (or whatever language it is written in).
- 5 - Choose "Code Style".
- 6 - Select "Formatting".
- 7 - Select "New Lines".
In the right panel, all checkboxes in the "New Line options for braces" section are unchecked.
The following format becomes automatic.
public void OnDrag(PointerEventData eventData) { //Do Something.. }