OOPS
public interface I1
{
void Add();
}
interface I2
{
void Add();
}
public class A : I1, I2
{
void I1.Add()
{
Console.WriteLine("A - I1");
}
void I2.Add()
{
Console.WriteLine("A - I2");
}
}
class Program
{
static void Main(string[] args)
{
I1 obj2 = new A();
obj2.Add();
Console.ReadLine();
}
}
What will be Output of above program and Why???
Please comment below...
Answer is:- "A - I1"
ReplyDeleteKindly share the reason also...
Delete