I type the code below:
if (rows == 0) break;
and when I add the semicolon at the end, VS springs into action and converts it to:
if (rows == 0)
break;
Same thing happens with if (rows = 0) return; and some other constructs.
How can I prevent VS from formatting this specific code interaction without messing with all the other niceties that it provides? I looked in Tools/Options/Text Editor/C#/Code Style/Formatting, but don't see anything obvious.
you add pragam waning disable settings, so when you do Ctr+K+D it will not format or whatever shortcut keys you may be using to format.
#pragma warning disable format
public class Item
{
public string Prop1 { get; set; }
public string Prop2 { get; set; }
}
#pragma warning restore format
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With