C# .Net Example of Basic OOP Implementation


Ahhh.. finally i have time to write again after took long leave days. I hope next week i can pay all of my debt (tutorial every week) 😀 . This time i will share you the basic Object Oriented implementation in C#. I believe people who use .Net understand the basic of OOP, but most people don’t utilize all of the advantage of OOP. Have you tried to use aggregation? Have you tried to use abstraction? Have you tried to use interface? If you are not, it’s the good time to you to get new knowledge about that. I have written an example of C# console program that make you easier to understand, once you debug this code will give you better knowledge in OOP.

Here is the C# console program codes :

You will get this result after you run this program :


I have written the comment on each important line to make you easy to understand what are codes for. Please waiting for the next OOP explanation. 🙂 cheers.

FatkhanFauzi About FatkhanFauzi

A passionate software engineer who wants to share anything that he learns and some of his life experiences. Want to know more about him? see Fatkhan Fauzi Profile


  • Reply Agung Setiawan |

    Too confusing
    Why don’t you categorized your sample code topic by topic, ex :

    1. Aggregation
    – example code
    – explanation

    2. Abstraction
    – example code
    – explanation

    and so forth

    • Reply FatkhanFauzi |

      Nope, i emphasize the combination among them.
      Once we debug this code we will understand the correlation of each line codes.

      I have written the comment on each line, and i think it will give the better knowledge on what is code for. 😀

So, what do you think ?

Leave a Reply to Agung Setiawan Cancel reply

%d bloggers like this: