Article ID: 166928 - Last Review: June 29, 2004 - Revision: 4.0 FIX: Public Properties of VB4 Class Are Passed by ReferenceThis article was previously published under Q166928 SYMPTOMS
If you have a Visual Basic 4.0 class with a public property implemented
like the following:
However, if your property is implemented in Visual Basic 4.0 using property procedures (Property Get, Property Let, Property Set), it will be passed by value (ByVal). STATUS
This problem has been fixed in Visual Basic 5.0. All properties are now
passed by value (ByVal) for consistency. In addition, all code internal to the class still has direct access to member variable data: MORE INFORMATION
Microsoft has acknowledged that this change in behavior may be an issue for
some developers porting Visual Basic 4.0 code to Visual Basic 5.0. Code
that relies on the ByRef functionality stated above will need to be
modified. One possible way to modify the Visual Basic 4.0 for porting to Visual Basic 5.0 is shown below: Original Visual Basic 4.0 code: APPLIES TO
| Article Translations
|
Back to the top
