Introduction to Class Programming

What is a Class

Many novice programmers when exposed for the first time in Object Oriented Programming tend to confuse classes and object. To aid the programmer about classes and object, this will give you some reminders. Your users will never see a class; rather, they will only see and act with objects created from your classes. As a programmer, your point of view is opposite because the thing you'll have in front of you while you're writing the application is the class, in the form of a class module. Until you run the application, an object isn't more real than a variable declared with a Dim statement in a code listing.

A class is a part of the program that defines the properties, methods and events of one or more object that will be created during execution. An object is an entity created at run time, which requires memory and some resources and is then destroyed when it's no longer needed or when the application end. In short, a class are design time only entities, while object are run-time entities. Or in more or less technical term

A class is a template or formal definitions that defines the properties of an object and the methods used to control that object's behavior. The description of these members is done only once, in the definition of the class. The object that belongs to a class, called instance of the class, share the code of the class to which they belong but contain only their particular setting for the properties of the class. Everything an object knows is expressed in its properties and everything it can do is expressed in its methods. Object interacts with each other by sending message requesting that method be carried out, or that properties be set or returned. A message is simply the name of an object followed by the name of one of its members.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only 3 numbers of interest to a computer scientist: 1, 0 and infinity”