Hi everyone. I'm new to C# (or any programming language for that matter) and am trying to figure something out. I'll give the following example.
int SomeValue = 24;
if (SomeValue == 24)
MessageBox.Show("The Value is 24");
For the above piece of code, why is it that the semicolon used to declare the variable, and for the MessageBox.Show statement, but not the if statement? What I'm getting at is, are there rules and what are they for when a semicolon is used and when is it not?