Skip to main content
Post Made Community Wiki by user36294
Source Link
JohnFx
  • 19k
  • 9
  • 68
  • 113

I almost always use the brackets just to be on the safe side. However, sometimes if the contents of the block are really short I'll do leave them off and make it a one-liner like so:

if (x==5) Console.WriteLine("It's a five!");