Object Oriented Programming Concepts - C#
Object-oriented Programming Concepts
An object-oriented program is a collection of objects sending messages to one another. The following table lists several terms with which you should be familiar.
| Term | Description |
| Classes | Classes are the basic unit of any object-oriented language.
|
| Object | An object is an instance of a class.
|
| Method | The behavior of the program is defined inside the body of methods.
|
| Fields | The fields of a class are the data members (variables) that are used to track the state of the class.
|
| Properties | In a generic sense, a property is any data member or field associated with an object. Properties are unique to a class instance. In a way, it is the object's properties that differentiate one object from another. In a strict sense, object properties are better referred to as fields or data members.
In a formal sense, a property is a programming construct that lets you access (get) or modify (set) the fields of an object. |
| Event | An event is a class member that enables an object or class to provide notifications. You can write event handlers that link code to events. When the event occurs, the code in the linked handlers is executed. |
| Namespace | Namespaces are used to organize the program and prevent name collisions.
|
Tags: