1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

protected data VS private data...

Discussion in 'C#' started by samuelwhalley, Apr 24, 2008.

  1. samuelwhalley

    samuelwhalley New Member

    Joined:
    Apr 24, 2008
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    0
    Hi....

    any idea...
    I've been told to never use protected data, and instead to always use private data with protected access functions. Is that a good rule???why??
    can you give a brief explanation to this...???


    THANKS in advance expert.....
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,285
    Likes Received:
    364
    Trophy Points:
    83
    It all depends on your context and there is no such golden rule.
     

Share This Page