I
I
Ilya1992018-07-06 17:33:11
visual studio
Ilya199, 2018-07-06 17:33:11

How can I make visual studio not wrap the second parenthesis at the beginning of the line when {}?

5b3f7cc0dcc1d686030723.png
Here, the second parenthesis always wraps the newline to the very beginning
Is it possible to make it wrap without putting the second parenthesis to the very beginning?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Makarov, 2018-07-07
@Ilya199

1. Create an .editorconfig file at the root of the project (usually next to the solution file).
2. Write there:

[*.cs]
csharp_new_line_before_open_brace = false

3. Reopen the solution or all .cs files.
4. Profit.
Settings in .editorconfig take precedence over what is configured in your Studio and are preferred to those that apply to everyone who works with the project (if this file is committed to the repository). If some setting is not specified in .editorconfig, your personal settings specified in the options in the Studio are applied.

I
Ilya199, 2018-07-07
@Ilya199

Solved
I had a folder open, where 2 projects were open, 1 - gui, 2 - console, another one in the console, tried to make a condition in this under the console project - everything works, then I didn’t understand anything at all I
completely deleted the folder where all these were projects, then created a new project, then a console application, tried to write a condition - everything works

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question