If Statement Block of code best practice


i have silly question paying attention small stuff because plan on getting certified end of year or sometime next year.

i read best practice use opening , closing brackets if statements in event or else adds code later.  this makes sense me not remember read when re-factoring code can uses compound statements , omit brackets make code cleaner.  which method best practice according microsoft?

// if(boolean) // else // or else

// or if(boolean) {

// } else {

// or else }


its argument if want simple readable code or short one. thing keep simple , add braces break head on how turn 1 line , make impossible read. @ least thats opinion.

please mark answered if answers question or unmark answered if did not.
happy :)
my site



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user