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

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'