What are the benefits of using properties internally?

Posted by cyclotis04 on Stack Overflow See other posts from Stack Overflow or by cyclotis04
Published on 2010-05-21T18:50:25Z Indexed on 2010/05/21 19:00 UTC
Read the original article Hit count: 196

Encapsulation is obviously helpful and essential when accessing members from outside the class, but when referring to class variables internally, is it better to call their private members, or use their getters? If your getter simply returns the variable, is there any performance difference?

© Stack Overflow or respective owner

Related posts about c#

Related posts about encapsulation