C# Basics C# Help

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

  1. Declaring variables
  2. Initialization and scope of variables
  3. Predefined C# data types
  4. Dictating the flow of execution within a C# program using loops and conditional
  5. statements
  6.  Enumerations
  7.  Namespaces
  8. The Main () method
  9.  Basic command-line C# compiler options
  10.  Using System. Console to perform console I/O
  11.  Using comments and documentation features
  12.  Pre-processor directives
  13.  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 later chapters.

Before We Start

As already mentioned, 01 is an object-oriented language. Throughout this chapter and later chapters, we assume that you have a good grasp of the concepts.behind object-oriented OO) ‘. programming. In other words, we expect that you understand what we mean by classes, objects interfaces, and inheritance. If you have programmed in C++ or Java before, you should have a pretty good grounding in object-oriented programming (OOP). However, if you do not have a background in OOP, you may find it helpful to familiarize yourself with OOP basics before continuing.

In this chapter, we make many comparisons among C#, C++, Java, and Visual Basic 6 as we walk . through the basics of C#. If you are an experienced developer in these programs, you might prefer to read a comparison between C# and your selected language before reading this chapter. If so, we have also made available separate documents for download on the Wrox Press Web site (WWW. wrox . com) that give introductions to C# from the point of view of each of these languages.

Posted on October 27, 2015 in C# Basics

Share the Story

Back to Top
Share This