Chapter 2: C Basics

 
Chapter 2 - C# Basics
bySimon Robinsonet al.
Wrox Press 2002
  

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# will give you a good start in that direction by providing you with a basic knowledge of the fundamentals of C# programming, which we will build on in subsequent chapters. The main topics we will be covering are:

  • Declaring variables

  • Initialization and scope of variables

  • C#'s predefined data types

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

  • Calling and declaring classes and methods

  • Using arrays

  • Operators

  • Type safety and how to convert between data types

  • Enumerations

  • Namespaces

  • The Main() method

  • Basic command-line C# compiler options

  • Using System.Console to perform console I/O

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

  • C# identifiers and keywords

By the end of this chapter you will know enough C# to write simple programs, though without using inheritance or other object-oriented features. We will be exposing these details in the next few chapters of the book.

  


Professional C#. 2nd Edition
Performance Consulting: A Practical Guide for HR and Learning Professionals
ISBN: 1576754359
EAN: 2147483647
Year: 2002
Pages: 244

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