I have 2 modules. Each contains a Sub with the same name. See below:
Module moduleA
Public Sub f(ByVal arg1 As myType)
Console.WriteLine("module A")
End Sub
End Module
Module moduleB
Public Sub f(ByVal arg1 As myType, ByVal arg2 As Boolean)
Console.WriteLine("module B")
End Sub
End Module
But the compiler complains that there's ambiguity between moduleA and moduleB.
How could this be? I have totally different signatures.
However, if I put the 2 methods into the same module, there's no ambiguity at all.
Could someone tell me why?
Many thanks.