Programming Tutorial: Classes Part 1
esse quam videri
Language: C#
Basics
Objects are not as complicated as you might think. You can almost think of them as mini-programs, because they have variables and methods, just like a program. However, they are modular and can be applied to many different situations. One of the many advantages of an object is that it can be written in one place and used in many, like a function.
The best way to understand an object in code is by relating it to a object in real life. The classic example is a dog. Say we have a dog. Dogs have a name, age, and a weight. A possible object for this in a C# console application would be:
<csharp>class dog {
public string name; public int age, weight;
}</csharp>