Question: I'm trying out to convert this here: http://support.microsoft.com/kb/828736 to VB.net
I got it to work in C#, and it should work without problems in VB.net, the only problem is the managed class won't compile, i get this error:
Error Class "ManagedClass" has to implement "Function Add(Number1 As Integer, Number2 As Integer) As Integer" for the ICalculator-Interface
Why? I see one function declared, and one implemented, and that with the same arguments... What's wrong ?
Imports System
Imports System.Collections.Generic
Imports System.Text
Namespace TestLibrary2
' Interface declaration.
Public Interface ICalculator
Function Add(ByVal Number1 As Integer, ByVal Number2 As Integer) As Integer
End Interface
' Interface implementation.
Public Class ManagedClass
Implements ICalculator
Public Function Add(ByVal Number1 As Integer, ByVal Number2 As Integer) As Integer
Return Number1 + Number2
End Function
End Class
End Namespace