我们最近在我们的解决方案中遇到了一个与此类似的界面。当我们升级到 VS 2015 时,它导致了构建问题。我们相信删除代码是安全的,但要确保没有其他人能想到为什么这是有效代码或不安全的代码来更改(我们会删除所有这些的工具)?
Public Interface IMyInterface
Property p1 as string Implements IMyInterface.p1
Property p2 as string Implements IMyInterface.p2
Property p3 as string Implements IMyInterface.p3
Property p4 as string Implements IMyInterface.p4
.
.
.
End Interface
只是不确定接口(interface)方法为什么或如何在其自身上实现属性。
最佳答案
The Visual Basic reserved word Implements is used in two ways. The Implements statement signifies that a class or structure implements an interface. The Implements keyword signifies that a class member or structure member implements a specific interface member.
您应该删除属性声明的 Implements IMyInterface.p_
部分。
关于vb.net - 接口(interface)实现它自己的方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32074554/