Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3. Introduction to C# Applications

3. Introduction to C# Applications

Objectives

In this chapter you’ll learn:

  • To write simple C# applications using code rather than visual programming.

  • To write input/output statements.

  • To declare and use data of various types.

  • To store and retrieve data from memory.

  • To use arithmetic operators.

  • To determine the order in which operators are applied.

  • To write decision-making statements.

  • To use relational and equality operators.

  • To use message dialogs to display messages.

What’s in a name? That which we call a rose by any other name would smell as sweet.

William Shakespeare

When faced with a decision, I always ask, “What would be the most fun?”

Peggy Walker

“Take some more tea,” the March Hare said to Alice, very earnestly. “I’ve had nothing yet,” Alice replied in an offended tone, “so I can’t take more.” “You mean you can’t take less,” said the Hatter: “it’s very easy to take more than nothing.”

Lewis Carroll

Outline

3.1Introduction
3.2A Simple C# Application: Displaying a Line of Text
3.3Creating a Simple Application in Visual C# Express
3.4Modifying Your Simple C# Application
3.5Formatting Text with Console.Write and Console.WriteLine
3.6Another C# Application: Adding Integers
3.7Arithmetic
3.8Decision Making: Equality and Relational Operators
3.9Wrap-Up