Currently I'm using .Net 3.5 so please let me know if it has been fixed in a later version.
Currently I have 2 methods with the following signatures:
void Method1(string, string)
void Method1(string, params string[])
If I make a call such as this
Method1("test1", "test2")
how does the compiler know which method to call? Why does .Net allow this?
I assume that in the IL, the resulting code is different and therefore allowed, but it shouldn't be, because you can get unexpected results. Is there a good reason why this is allowed?
Thanks in advance.