particular auto-format for Properties C# VS2010
-
26-06-2021 - |
문제
I am using VS2010.
Auto formatting upon using '}' has been extremely useful for me, however recently it's been quite a pain while I've been working on a library.
If i use the line:
public Single ExampleProperty { get; set; }
It auto formats to:
public Single ExampleProperty
{
get;
set;
}
How can i stop this from happening? I don't want to disable auto-formatting, i just want to enable something like 'allow properties to be defined on a single line' or something.
해결책
Tools -> Options -> Text Editor -> C# -> Formatting -> Wrapping -> Leave block on single line
This should be what you are looking for
제휴하지 않습니다 StackOverflow