December 2001
Beginner
976 pages
22h 4m
English
To determine whether a field, property, or method would be better modeled as shared than as an instance member, you can look at a few criteria. We present a few of the most common ones later in this chapter.
If you have a class method or property that does not use or refer to any instance members, it is a good candidate for becoming a shared method or property.
If a field value is the same value in all objects, then it is almost certain that it would be better to be a shared field.
Sometimes, you will find out that a class, especially if imported from an older version of Visual Basic, would have a lot of methods and properties that are really shared, but they were not declared as such because the language ...
Read now
Unlock full access