Objects and Types C# Help

So far, you’ve been introduced to some of the building blocks of the C# language, including variables, data types, and program flow statements, and you have seen a few very short complete programs containing little more than the Main () method. What you haven’t really seen yet is how to put all of these together to form a longer, complete program. :

The differences between classes and structs:

  1.  Class members
  2.  Passing values by value and by reference
  3.  Method overloading
  4.  Constructors and static constructors
  5.  Read-only fields
  6.  Partial classes
  7.  Static classes
  8.  The Object class, from which all other types are derived.

This chapter introduces the basic syntax associated with classes. However, we assume that you are already familiar with the  underlying principles of using classes – for example, that you know what a constructor or a property is. This chapter is largely confined to applying those principles in C# code.

we introduce and explain those concepts that are not necessarily supported by most object-oriented languages. For example, although object constructors are a widely used concept that you should be familiar with, static constructors are something new to C#, so this chapter explains how static constructors work .

Posted on October 28, 2015 in Objects and Types

Share the Story

Back to Top
Share This