Section 3.1. Statements


3.1. Statements

In C#, a complete program instruction is called a statement and each statement ends with a semicolon (;) . Programs consist of sequences of statements such as:

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

The compiler starts at the beginning of a source code file and reads down, executing statement after statement in the order encountered . 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 5 for more information about branching.



Learning C# 2005
Learning C# 2005: Get Started with C# 2.0 and .NET Programming (2nd Edition)
ISBN: 0596102097
EAN: 2147483647
Year: 2004
Pages: 250

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