-
October 3rd, 2012, 09:00 PM
#1
New to C# A few Q's
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.
Code:
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?
Cheers,
Sapper
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|