Interviewer And Interviewee Guide

C# (Sharp) Programming Language Interview Question:

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

Submitted by: Administrator
There is no way to restrict to a namespace. Namespaces are never units of protection. But if you're using assemblies, you can use the 'internal' access modifier to restrict access to only within the assembly.
Submitted by: Administrator

Read Online C# (Sharp) Programming Language Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.