G
Gav
I have a class that implements 2 interfaces and have got myself a bit stuck.
What I am trying to do is hide the implementation of the class so that you
are forced to use one of the interfaces. Problem I have now is that my
constructor needs to call a method that is from one of the interfaces and
I'm not sure how to call it. Can anybody point me in the right direction?
Simple example below
thanks
Gav.
public interface1
{
void Method1();
}
public interface2
{
void Method2();
}
public class myClass: interface1, interface2
{
public myClass()
{
// How to call Method1?
}
void interface1.Method1()
{
}
void interface2.Method2()
{
}
}
What I am trying to do is hide the implementation of the class so that you
are forced to use one of the interfaces. Problem I have now is that my
constructor needs to call a method that is from one of the interfaces and
I'm not sure how to call it. Can anybody point me in the right direction?
Simple example below
thanks
Gav.
public interface1
{
void Method1();
}
public interface2
{
void Method2();
}
public class myClass: interface1, interface2
{
public myClass()
{
// How to call Method1?
}
void interface1.Method1()
{
}
void interface2.Method2()
{
}
}