October 2008
Beginner to intermediate
680 pages
16h 48m
English
As we saw in Chapter 1, we invoke one of two methods—Console.WriteLine() or Console.Write()—to print text messages to the command-line window as follows:
Console.WriteLine(expression to be printed); Console.Write(expression to be printed);
We glossed over the syntax of this particular operation when this capability was first introduced; now that you know much more about objects, let's revisit this syntax in more depth.
Console is a class provided by the CLR Base Class Library (part of the FCL) within the System namespace. The Console class defines numerous overloaded static Write and WriteLinemethods; the various versions each accept a different argument type: string, the various predefined value types, ...
Read now
Unlock full access