K
KK
Is it possible to have a interface accessible by all the projects
in my solution, but that interface should be hidden to users.
For example defining a interface ommittng the public
keyword;
interface IRestricted{
bool Test();
}
public class Something:IRestricted
public method1(){}
bool IRestricted.Test(){};
}
In the above, Test method has been explicitly defined
and it can only be accessed internaly. public users can't
use the Test method and they can't see the IRestricted
interface either. This is what I want to get done. But the
glitch is, I can't define the IRestricted interface inside my
root namespace so that ALL MY projects will be able to see
it(which makes my projects(modules) being able to
communicate with eaach other, but still general public
wont be able to see/access those explicitly defined methods)
Is it by design or am I doing something wrong? Further more,
If I define an interface(without public keyword) inside the
root ineterface, shouldn't it be visible to ANY project inside
that root namespace?
regards
KK
in my solution, but that interface should be hidden to users.
For example defining a interface ommittng the public
keyword;
interface IRestricted{
bool Test();
}
public class Something:IRestricted
public method1(){}
bool IRestricted.Test(){};
}
In the above, Test method has been explicitly defined
and it can only be accessed internaly. public users can't
use the Test method and they can't see the IRestricted
interface either. This is what I want to get done. But the
glitch is, I can't define the IRestricted interface inside my
root namespace so that ALL MY projects will be able to see
it(which makes my projects(modules) being able to
communicate with eaach other, but still general public
wont be able to see/access those explicitly defined methods)
Is it by design or am I doing something wrong? Further more,
If I define an interface(without public keyword) inside the
root ineterface, shouldn't it be visible to ANY project inside
that root namespace?
regards
KK