I've made an interface called ApprovalEvent
in a separate file with 开发者_如何学JAVAthe namespace myproject
... I've also made a class called PurchaseOrder
... it's also in the same namespace, just in a separate file. Whenever I try to make PurchaseOrder
implement ApprovalEvent
it always says that ApprovalEvent is undefined
...
How can I make the class recognize that the interface exists but is in a different file?
Here's some code:
File #1
Namespace myproject
Public Interface ApprovalEvent
Function getDetails() As String
End Interface
End Namespace
File #2
Namespace myproject
Partial Class PurchaseOrder
Inherits Entities.Modules.PortalModuleBase
Implements ApprovalEvent
Function getDetails() As String Implements ApprovalEvent.getDetails
return "details"
End FUnction
End Class
End Namespace
Thanks,
MattSeparate project too? Does the one project include the other as a reference if so? That shouldn't be a problem from what I can see. It works no problem. Try temporarily including the interface in the same file too, see if that helps.
精彩评论