문제

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top