L
Laurent Vigne
Hello, I would like to know how to make the methods of an interface
inaccessible from outside
Example:
----------------------------------------------
internal Interface ImyInterface
{
void MyPrivateMethod(); // I cant define any accessibility here, well
ok !
}
public class A, ImyInterface // I cant implement my interface with
Private or internal accessibility, well ok !
{
public void MafonctionTresPrivee() // Why I cant use private or
internal accessibility here ???
{
ASSERT(false);
}
}
public class B
{
A myObjectA = new A();
myObjectA.MyPrivateMethod (); // Heyyy, we can reach my method here
!!!
}
inaccessible from outside
Example:
----------------------------------------------
internal Interface ImyInterface
{
void MyPrivateMethod(); // I cant define any accessibility here, well
ok !
}
public class A, ImyInterface // I cant implement my interface with
Private or internal accessibility, well ok !
{
public void MafonctionTresPrivee() // Why I cant use private or
internal accessibility here ???
{
ASSERT(false);
}
}
public class B
{
A myObjectA = new A();
myObjectA.MyPrivateMethod (); // Heyyy, we can reach my method here
!!!
}