I have an interface IMaths
which contains a single function ADD as follows. The name of this project is MyInterface which also becomes the default namespace. The code is as follows.
Class InterfaceHolder
Interface IMaths
Function ADD(ByVal a As Integer, ByVal b As Integer) As Integer
End Interface
End Class
The other project is titled MyMathsLibrary (also a class library) which references MyInterface and ideally I would like to write something like the following:
Public Class MathOperations
Implements MyInterface.IMaths 'Getting error
End Class
But its not working. The error message is
"Type Imaths is not defined"
Can someone pls tell me how to create a class library with an interface? And how can another class library reference that and implement the interface in the way shown above - that is without creating an object (note that I was not able to declare the Interface as shared)?