public
interface
IA
{
void TestA();
}
public interface IB
{
void TestB();
}
public class AB : IA, IB
{
public void TestA()
{
Console.WriteLine( " Test A " );
}
public void TestB()
{
Console.WriteLine( " Test B " );
}
}
class Program
{
static void Main( string [] args)
{
IA aa = Activator.CreateInstance( typeof (AB)) as IA;
IB bb = aa as IB;
aa.TestA();
bb.TestB();
}
}
{
void TestA();
}
public interface IB
{
void TestB();
}
public class AB : IA, IB
{
public void TestA()
{
Console.WriteLine( " Test A " );
}
public void TestB()
{
Console.WriteLine( " Test B " );
}
}
class Program
{
static void Main( string [] args)
{
IA aa = Activator.CreateInstance( typeof (AB)) as IA;
IB bb = aa as IB;
aa.TestA();
bb.TestB();
}
}