How does this confuse the compiler? The compiler expects to find an implementation for each method signature and distinguishes implementations by their signatures.
If the signatures are identical / indistinguishable (in most cases this means that the arguments are of the same type in the same order), you will get a development-time error related to the interface, stating that these two methods cannot overload each other because they have the same signature.
So, in any case, the compiler should not be confused. If you need more help, attach a sample code - these things are relatively easy to resolve.
Tip. When writing an implementation, as soon as you write “implements MyInterface” and press Enter, Visual Studio will create a “skeletal” implementation code, which saves you from writing method signatures and correlating them with the interface.
Sample code in two ways with the same name and all functions:
Interface MyInterface Sub MySub(ByVal arg0 As DateTime) Sub MySub(ByVal arg0 As ULong) End Interface Class MyImplementation Implements MyInterface Public Sub MySub(ByVal arg0 As Date) Implements MyInterface.MySub ... End Sub Public Sub MySub(ByVal arg0 As ULong) Implements MyInterface.MySub ... End Sub End Class
MA Hanin
source share