实现Interface的方法不能使用static修饰符

 今天在写程序时, 在一个方法前加了static, 而这个方法实现了interface中的一个成员。编译时,总是出现“不会实现接口成员”的错误,百思不得其解,后来将static去掉,编译就成功。
 在www.asprelated.com上看到这么一段话:"It is a compile-time error for an explicit interface member implementation to include access modifiers, and it is a compile-time error to include the modifiers abstract, virtual, override, or static." 详细内容请看:  http://www.asprelated.com/csharp/sharp-13_4.aspx
posted @ 2004-03-24 10:15  dudu  阅读(9205)  评论(4编辑  收藏  举报