-
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.
-
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.
-
I Guess that makes sense.