|
-
Dec 2nd, 2001, 09:39 AM
#1
Thread Starter
Junior Member
When should i use a property and not a field?
Hello ppl,
In vb.net data-members can be fields, but also properties. A property looks
similar to a field, but is defined by it's get- and set-accessors.
However i don't understand the use of a property. Is it not easier
just to use a field instead?
Can smb explain this to me please?
Thanks,
A Pure Mind
-
Dec 9th, 2001, 07:37 PM
#2
Lively Member
With Fields you can't encapsulate your object's data, with Properties you can.
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
|