Get, Set and Let in class module

11-22-2005, 09:10 AM
Can anyone please tell me the purpose of Get, Set and Let in a class module?
Also what is the difference between the keywork Null and Nothing?

11-22-2005, 09:39 AM
Get, Set and Let have the same purpose in a class module as they do anywhere else: to provide procedural handlers for properties and to give you a way of controlling what you can do with the properties on the public interface of a class.

Null is the integer value 0; Nothing is effectively VB's way of representing a null object pointer.

11-22-2005, 12:17 PM
To piggyback on wakjah's comment. Set will generally be used with class properties cached as objects, for example: stdFont, stdPicture, etc. Get & Let are generally used for properties cached as variables.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum