public interface ITestA
{
void Calculate();
}
public interface ITestB
{
void Calculate();
}
class InterFaceTest: ITestA , ITestB
{
public void Calculate()
{
MessageBox.Show("Class Method");
}
void ITestB.Calculate() //SCOPE INTERNAL
{
MessageBox.Show("Interface B");
}
void ITestA.Calculate() //SCOPE INTERNAL
{
MessageBox.Show("Interface A");
}
}
InterFaceTestobj = new InterFaceTest();
obj.Calculate();
ITestA objA = new InterFaceTest();
objA.Calculate();
ITestB objB = new InterFaceTest();
objB.Calculate();
No comments:
Post a Comment