Section 5.6. Statements

   

5.6 Statements

In C#, a complete program instruction is called a statement . Programs consist of sequences of C# statements, each of which must end with a semicolon (;). Here are three statements:

 int myVariable;                      // a statement myVariable = 23;                     // another statement int anotherVariable = myVariable;    // yet another statement 

C# statements are evaluated in order. The compiler starts at the beginning of a statement list and makes its way to the bottom. This would be entirely straightforward, and terribly limiting, were it not for branching. Branching allows you to change the order in which statements are evaluated. See Chapter 6 for more information about branching.

   


Learning C#
Learning C# 3.0
ISBN: 0596521065
EAN: 2147483647
Year: 2005
Pages: 178

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net