今天在写程序时, 在一个方法前加了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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2021-07-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
相关资源
相似解决方案