所以,我想创建一个接口,它有一个可以接受任何模型类的方法.例如
我有这三个属性类
class A
{
public long id { get; set; }
public string description { get; set; }
public string code { get; set; }
}
class B
{
public long someID { get; set; }
}
class C
{
public long anydesign { get; set; }
}
class D
{
public long Router { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我有一个界面
public interface IModel
{
void Dosomething(A model); // Now in this example it takes the A model,But I want …Run Code Online (Sandbox Code Playgroud) c# ×1