why the interface cannot have static member method
本问题已经有最佳答案,请猛点这里访问。
Possible Duplicate:
Why shouldn't C#(or .NET) allow us to put a static/shared method inside an interface?
号
为什么我们不能在接口内部定义静态方法?
从谷歌的搜索结果来看:
Because an interface is a"contract"
or an agreement between the consumer
(caller) and the provider (callee). An
interface describes what and how the
calle will provide functionality.
There is no need for static members
provided by a third party. Static
members cannot be overridden by a
provider so they do not belong in an
interface.Stefan Rusek
08 February 2006
号
因为这没有任何意义。
用一个静态接口方法设计一个场景。
然后,如果您需要帮助指出问题和不一致之处,请将其发布在这里。