Basic Expressions

An expression is defined as a syntactically correct program statement. However, for the purpose of this chapter, the expressions we're most interested in revolve around assignment and evaluation, and true/false determination. An assignment expression has at least one variable and one value to be assigned to that variable. Such is the case of declaring an integer value and assigning it the default value of 10. All variables must be initialized before use; otherwise, the C# compiler will bitterly complain about the usage of an uninitialized variable. So, what does this mean exactly? Take a look at the following C# statements :

						int i;         //C# complains about the uninitialized variable
						
						int j = 10; //variable j has the initial value ...

Get Microsoft® Visual C#® .NET 2003 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.