Getting Started with C# Object-Oriented Programming
C# is a powerful and flexible programming language provides several features. Like all programming languages, it can be used to create a variety of applications. C# is an object-oriented programming language developed by Microsoft as part of the .NET Visual Studio and later approved as a standard by ECMA and ISO.
Object-oriented programming (OOP) introduced the concept of classes and objects in the early ’90s. In 1962 "SIMULA 1" and in 1967 " SIMULA 67" used the concept of Object-oriented programming and these are the two earliest object – oriented languages. Even though most of the advantages of OOP were available in the earlier Simula languages, it wasn’t popular till the evolution of C++. The C++ is a very powerful object oriented language; it is in fact a mixture of both methodologies, the traditional and OOP approaches. However, with that power comes with a lot of complexity. Language developers wanted a simpler and perhaps less complex language for OOP development.
The next step in the development of OOP started in January of 1991 when James Gosling with his team comes up with a powerful alternative to C++; Oak programming language (or Java). Within a short time span Java quickly grew and become a popular programming language for web as well as windows development.
When the Java was on the peak of success, At Microsoft, developers was working on development of a new programming language C#; an object oriented programming language by Microsoft to answer Java. It was first released in its alpha version in the middle of 2000. C#’s chief architect was Anders Hejlsberg. Hejlsberg is one of the world’s leading language experts, with several notable accomplishments to his credit, including Borland Turbo C++ and Borland Delphi.
Object-Oriented Programming (OOP) is a powerful way to approach the job of programming. C# provides us with a robust object – oriented programming language features and an impressive set of tools to tackle almost any programming complexity or you desire programming task. Whether you wish to develop desktop application, distributed application, web application, or mobile applications, C# can handle the task effectively and easily for you.
Object-oriented programming comes with the best ideas of structured programming combined with several new concepts. In the most general sense, a program can be organized in one of two ways: around its code (what is happening) or around its data (what is being affected). Using only structured programming techniques, programs are typically organized around code. This approach can be thought of as “code acting on data.”
Object-oriented programs work the other way around. They are organized around data, with the key principle being “data controlling access to code.” In an object-oriented language, you define the data and the code that is permitted to act on that data. Thus, a data type defines precisely the operations that can be applied to that data.
To support the principles of object-oriented programming, all OOP languages, including C#, have some traits in common: Abstraction, Encapsulation, Polymorphism, and Inheritance.
Abstraction: The ability to create abstract data objects (classes) that can be used to create instances.
Encapsulation: Protecting some data members by hiding the implementation and exposing the interface that keeps both "code and the data it manipulates" safe from outside interference and misuse.
Polymorphism: Polymorphism helps reduce complexity by allowing the same interface to be used to specify a general class of action. Changing the behaviour of the methods of the inherited class.
Inheritance: Inheritance is the process by which one object can acquire the properties of another object by reusing the code by specializing classes and adding features to them.





useful for beginners.