Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace ?

 Posted by Bharathi Cherukuri on 4/23/2012 | Category: C# Interview questions | Views: 1265 | Points: 40

No, there is no way to restrict to a namespace.The namespaces are never the units of protection. But if you’re using assemblies, you can use the ‘internal’ access modifier to restrict access to only within the assembly.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response