定义接口
cs
public interface IMyInterface
{
int MyProperty { get; set; }
void MyMethod();
}
实现类
cs
internal class MyClass : IMyInterface
{
public int MyProperty { get; set; }
public void MyMethod()
{
Console.WriteLine("MyMethod is called");
}
}
目录结构