top of page

Object programming C#

Hi and welcome in my first talks about object programming!

As first step i want talk about different ways to make application. We can use few types of programming languages:

- functional,

- structural,

- object oriented

Why object programming not structural or functional? Because that types of languages are the best to create business applications and games. You can make an object and have state of object inside. So roles are very simply, but you need to understand idea of OO (object oriented) programming.

Languages which are created as OO have the smallest object as root. That mean everything comes from pre-object. It is very primitive thing, but it give a shape for every object, like your parents give you some data in DNA. That give us some possibilities like comparing objects (this man got brown hair, second one got blonde), we can order them in an array (blonde is first, brown is second, rude is third), because they got common ancestor. Of course, these opportunities are more, but these are probably the most commonly used.

Ok, so in those course we will concentrate on C#. You can read you want some about JAVA and C++, but remember this can be DANGEROUS. The languages are similar just in theoretical way! Everyone has his own small differences which are important for working of application.

What is object?

Object is an abstract data structure. You can imagine it a parking place in your computer memory. Where you have digits, characters and objects as not defined data.

How to create that data structure?

class cake {

protected char[] listOfIngredients;

public cake() {};

public void make() {};

public static void main() {}; }

The most important here is word class. Classes are a recipe for creating an object. You can think about it as a cake. In my cake I have milk, sugar, flour and chocolate - listOfIngredients. Now, when I have all i need to mix it - make(). Conclusion - class got things in variables which are necessary for creating something and how to make it in functions.

Create an object:

Cake applePie = new Cake();

After that operation we have and object in our memory and it looks some like that:

So that is all for now, give me feedback and look read next episode.

Have a nice day!

Subscribe me!

Be sure that you read all.

  • Facebook Clean
  • Black Twitter Icon
  • Black Instagram Icon
  • Black YouTube Icon
Recent Posts
bottom of page