|
-
May 10th, 2001, 11:31 AM
#1
Property Get vs Function
In an existing application in a standard module there are several Public Property Get. Who can explain me, why there were used instead of Public Functions. There are no local members at all. Those properties are used as regular functions. Is there any advantage with this approach? Or it's just bad knowledge of VB?
Thank you.
Vlad
-
May 10th, 2001, 01:27 PM
#2
Re: Property Get vs Function
Functionaly, they are the same thing - do some action, return a result. Design-wise, a Get property procedure should return only the current value of some local variable in a class module. If the routine is to perform some sort of action(s), then it should be a function, so everyone knows, just by looking in the object browser, what its purpose is.
just my $.02
john
John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
-
May 10th, 2001, 01:42 PM
#3
Re: Property Get vs Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|