Go to Tools > Options > Text editor > C# > Formatting > Wrapping
Check “Leave block on single line” and “Leave statements and member declarations on the same line”

Go to Tools > Options > Text editor > C# > Formatting > Wrapping
Check “Leave block on single line” and “Leave statements and member declarations on the same line”
