Chapter 2: C Basics


Overview

Now that you understand a little more about what C# can do, you will want to learn how to use it. This chapter on the basics of C# gives you a good start in that direction by providing you with a basic knowledge of the fundamentals of C# programming, which we build on in subsequent chapters. The main topics we cover are:

  • Declaring variables

  • Initialization and scope of variables

  • Predefined C# data types

  • Dictating the flow of execution within a C# program using loops and conditional statements

  • Enumerations

  • Namespaces

  • The Main() method

  • Basic command-line C# compiler options

  • Using System.Console to perform console I/O

  • Using documentation features in C# and Visual Studio .NET

  • C# identifiers and keywords

  • Recommended guidelines and conventions for good programming in C#

By the end of this chapter, you will know enough C# to write simple programs, though without using inheritance or other object-oriented features, which are covered in the following chapters.




Professional C# 2005
Pro Visual C++ 2005 for C# Developers
ISBN: 1590596080
EAN: 2147483647
Year: 2005
Pages: 351
Authors: Dean C. Wills

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