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,336
    Likes Received:
    377
    Trophy Points:
    83
    It all depends on your context and there is no such golden rule.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice