返回首页

我们怎样才能使一个类的成员内的命名空间的访问。
请看看以下之情况


namespace abc

{

 class a

 {

   internal int xyz;

 }

}

namespace def

{

 class d

 {

   public d()

   {

    a obj= new a();

    var x= obj.xyz;/// I want to restrict the programmer of namespace def not to  access xyz where as I want to keep xyz public inside the namespace abc



   }

 }

}

感谢您的援助。

回答

评论会员: 时间:2