Q:

If else statement without the else?

I was given this code and it has an If statement with two sets of curly brackets. I'm assuming it's an if else statement, but there is no 'else'
if (Value.Contains("WMD ESA"))
{
   UsersInfo.Add(Benefit.ToString());
}
{
   UsersInfo.Add(((decimal)Benefit.Amount().ToString());
}  

according to my break points this runs fine without any errors So I'm not sure.

A:

It's just an arbitrary code block. The curly braces here do nothing; they can be removed. It's functionally the same as the following:  
if (Value.Contains("WMD ESA"))
{
   UsersInfo.Add(Benefit.ToString());
}

UsersInfo.Add(((decimal)Benefit.Amount().ToString());

IMO they should be removed if this is intended, as it's pretty confusing (and uncommon in my experience). Although just make sure that an else was not intended!

