Just recently I found out you can do this in C#:
{
// google
string url = \"#\";
if ( value > 5 )
url = \"http://google.com\";
m
{
string f = "hello";
}
Just looks weird.
Obviously, methods need them:
private void hmm() {}
And switch statements:
switch(msg)
{
case "hi":
// do something
break;
// ...
}
And even if, for, foreach, while statements...
if(a == 1)
{
bool varIsEqual = true;
isBusy = true;
// do more work
}
But if you've only got 1 statement in a loop or if statement, you don't need the braces:
if("Samantha" != "Man")
msg = "Phew!";