Pages

Thursday, May 8, 2014

OOPS - Encapsulation


  1. A group of related properties, methods, and other members are treated as a single unit or object.
  2. A class or struct can specify how accessible each of its members is to code outside of the class or struct. 
  3. Methods and variables that are not intended to be used from outside of the class or assembly can be hidden to limit the potential for coding errors or malicious exploits.

http://msdn.microsoft.com/en-us/library/ms173109.aspx

http://msdn.microsoft.com/en-us/library/dd460654.aspx

http://msdn.microsoft.com/en-us/library/ms173149.aspx

1. Members

2. Accessibility

publicprotectedinternalprotected internal, and private. The default accessibility is private.





No comments:

Post a Comment