【发布时间】:2017-12-18 20:40:15
【问题描述】:
我想在 F# 中实现此处描述的解决方案: Inheritance from multiple interfaces with the same method name
具体来说,在 F# 中,如何解决在两个接口之间实现同名的接口函数?
这里是 C# 解决方案:
public interface ITest {
void Test();
}
public interface ITest2 {
void Test();
}
public class Dual : ITest, ITest2
{
void ITest.Test() {
Console.WriteLine("ITest.Test");
}
void ITest2.Test() {
Console.WriteLine("ITest2.Test");
}
}
【问题讨论】:
标签: .net inheritance f#