Results 1 to 3 of 3

Thread: Oop

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    outerspace
    Posts
    126

    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

  2. #2
    Lively Member
    Join Date
    Aug 2002
    Posts
    126
    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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    outerspace
    Posts
    126
    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
  •  



Click Here to Expand Forum to Full Width