interface IMyInterface
{
void MyMethod();
void MyDefaultMethod()
{
Console.WriteLine("Default implementation of MyDefaultMethod");
}
}
interface IFirstInterface
{
void MyMethod();
}
interface ISecondInterface
{
void MyMethod();
}
class MyClass : IFirstInterface, ISecondInterface
{
void IFirstInterface.MyMethod()
{
Console.WriteLine("Implementation of MyMethod for IFirstInterface");
}
void ISecondInterface.MyMethod()
{
Console.WriteLine("Implementation of MyMethod for ISecondInterface");
}
}
interface IMyInterface
{
string MyProperty { get; set; }
}
class MyClass : IMyInterface
{
public string MyProperty { get; set; }
}
interface IFirstInterface
{
void MethodA();
}
interface ISecondInterface : IFirstInterface
{
void MethodB();
}
class MyClass : ISecondInterface
{
public void MethodA()
{
Console.WriteLine("Implementation of MethodA");
}
public void MethodB()
{
Console.WriteLine("Implementation of MethodB");
}
}