.Net Questions/Answers
Q1: what are access modifiers? A: 1. Public Public means visible to everyone and everywhere. 2.Private Private means hidden and usable only by the class itself. No code using a class instance can access a private member and neither can a derived class. Information or functionality that will not be needed or has no meaning outside of the context of a specific class should be made private. 3.Protected Protected members are similar to private ones in that they are accessible only by the containing class. However, protected members also may be used by a descendant class. So members that are likely to be needed by a descendant class should be marked protected. 4. Internal Internal are public to the entire assembly but private to any outside assemblies. Internal is useful when you don’t want to allow other assemblies to have the functionality. 5. Protected internal Finally, we have the only compound access modifier allowed in .NET. Members marked as protected internal may be accessed...