- 3.1. Introduction
- 3.2. A Simple C# App: Displaying a Line of Text
- 3.3. Creating a Simple App in Visual Studio
- 3.4. Modifying Your Simple C# App
- 3.5. Formatting Text with Console.Write and Console.WriteLine
- 3.6. Another C# App: Adding Integers
- 3.7. Arithmetic
- 3.8. Decision Making: Equality and Relational Operators
- 3.9. Wrap-Up
3.9. Wrap-Up
You learned many important features of C# in this chapter. First you learned how to display data on the screen in a Command Prompt using the Console class’s Write and WriteLine methods. Next, we showed how to use format strings and format items to create formatted output strings. You learned how to input data from the keyboard using the Console class’s ReadLine method. We discussed how to perform calculations using C#’s arithmetic operators. Finally, you made decisions using the if statement and the relational and equality operators. As you’ll see in Chapter 4, C# apps typically contain just a few lines of code in method Main—these statements normally create the objects that perform the work of the app. You’ll implement your own classes and use objects of those classes in apps.