In languages ββthat support class / static data or methods, you can
- bind / bind data or methods explicitly with a set of objects defined by a class. Thus, you can have Customer.Count and Product.Count, and a simple counter (or @@ Count) in the client code will get access to the correct number.
- use such data or a method without having an instance of the class (for now).
VBScript does not support static data or methods. You should use global data or functions / subtitles and do the association in your mind (perhaps with a little help from the naming convention). Access to these "static" = global elements without an object is trivial, but obviously should be done with care.
You can embed one or more singleton objects or code references (GetRef ()) in your objects to bind them closer to the class, but this will increase the size of the instances.
source share