|
Thread: Oop
-
Aug 29th, 2002, 08:32 AM
#1
Thread Starter
Lively Member
Oop
Ive been learning integrating Object orientated programming in my projects. In .net it has become alot easier to take advantage of self written com objects at least it seems that way to me. My question is as I am trying to master the theoritical of oop, I have become a bit confused on when should I be using methods(functions that take in varibles or using properties) Say I have made a component that accesses my database. I pass it a sql string and a table name for the dataset. Should I be using properties to pass the method these values or is it proper to pass them when the method is called. When would it be most proper to be using properties. im sure im rambling though this has concept has kind of stumped me.
"All those who wonder are not lost" -j.r.r tolkien
-
Aug 29th, 2002, 09:11 AM
#2
Lively Member
hi,
every time u have to store data in object, u doing it through properties.
the object contain data and functions.
data stored in properties, and functions do something (and maybe using these data).
so why let pass these values as arguments function?
for performance reasons.
if u have an out of process object, each call to that object made through proxy and stub, and it is overhead addition. so instead calling the object three times, call it once, and pass the values right to the function.
-
Aug 29th, 2002, 09:36 AM
#3
Thread Starter
Lively Member
I Guess that makes sense.
"All those who wonder are not lost" -j.r.r tolkien
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
|