Friday, April 17, 2009

C# Basics

Why is object-oriented programming important in C#? It is because C# is a true object-oriented language. In C# everything is an object. Some objects are simple like integers, floats, doubles. Others are more complex like TcpClients and TcpListeners. You can also create your own objects that can be reused in other programs.

Some objects are considered types. These are fundamental objects that are used to build other objects.

Here is a short list of some of them:
  • int represents an integer like 1847 or -12784
  • float represents a floating point number like 1.29847 or 3.14159
  • bool represents a Boolean value that can be true or false
  • char represents a character like A or Z
  • string hold many characters of data like "Hello, my name is Bob!"

Objects are stored in variables. For example, suppose you wanted to store an integer. You would declare it like this:

int myInteger;

I think that is enough for today. Check back tomorrow and I will try and have a tutorial about how you would go about creating a simple C# program.

-----------------------------
Proud member of Dream.In.Code

No comments:

Post a Comment