O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.2. A Simple C# App: Displaying a Line of Text

Let’s consider a simple app that displays a line of text. The app and its output are shown in Fig. 3.1, which illustrates several important C# language features. Each program we present in this book includes line numbers, which are not part of actual C# code. In the Before You Begin section that follows the Preface, we show how to display line numbers for your C# code. We’ll soon see that line 10 does the real work of the app—namely, displaying the phrase Welcome to C# Programming! on the screen. We now discuss each line of the app—this process is called a code walkthrough.

 1   // Fig. 3.1: Welcome1.cs  2   // Text-displaying app.  3   using System;  4  5   public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required