Wednesday, June 19, 2013

Identifiers and Variables

Identifiers refer to the names of variables, functions arrays, classes, etc. created by programmer. They are fundamental requirement of any language. Each language has its own rules for naming these identifiers.
To name the variables of your program, you must follow strict rules. In fact, everything else in your program must have a name.
There are some rules you must follow when naming your objects. On this site, here are the rules we will follow:

• The name must start with a letter or an underscore or the at symbol @.

• After the first letter or underscore, the name can have letters, digits, and/or underscores.

• The name must not have any special characters other than the underscore.

• The name cannot have a space.

• It should not a keyword.

C# is case-sensitive. This means that the names Case, case, and CASE are completely different. For example, the main function is always written Main.

No comments:

Post a Comment