C#中的interface 其实是一种协议(Protocol)。在MSDN的接口(C#)中是如下定义的:An interface contains only the signatures of methods, properties, events or indexers.很明显,这里没有提到接口方法具有多态特性——这与Java中interface方法具有天然多态效应不一定。C# interface的接口默认为public,且不能具有virtual特性。有些奇怪的实现方法,会强迫接口表现出多态性,我个人是不喜好的。偏门的且违背本意的的东西尽量不碰,甚至不去理解学习——恰如当年都不去看goto章节一样。
这只能让我得出结论,C#的interface只是一种契约(Contract),一种协议(Protocol)。
C# interface, https://msdn.microsoft.com/zh-cn/library/87d83y5b.aspx
原文:http://www.cnblogs.com/jjseen/p/5129554.html