Hi
Can any one tell how many ways to encapsulate(Hide) ...................?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Datta KharadPosted Jan 3, 2012, 8:19 AM
These links will help you...
http://www.csharp-station.com/Tutorials/lesson19.aspx
http://dotnetslackers.com/articles/csharp/PolymorphismEncapsulation.aspx
Nipun TomarPosted Jan 3, 2012, 12:23 AM
Plz read the Article in below link:
http://www.csharp-station.com/Tutorials/lesson19.aspx
Thanks
VulpesPosted Jan 2, 2012, 5:11 AM
http://www.c-sharpcorner.com/uploadfile/Ashush/the-first-pillar-of-object-oriented-programming-encapsulation/
also explains 'encapsulation' in the OO sense very well.
You can also hide a base class member by declaring a member with the same name in the derived class. The compiler will warn you about this unless you qualify the derived class member with 'new'. You can still access the base class member using the 'base' keyword.
Notice also that a local variable or parameter will always hide a field of the same name. You can still access the latter by qualifying it with 'this' or, if its a static field, by qualifying it with the classname.
Pravin MorePosted Jan 2, 2012, 5:05 AM
please have look on below article.
Click Here
Thanks,
Pravin.