I've stumbled upon an issue on which I can't get my head around ...
The code below compiles and works perfectly with VB.NET at the end of the line.
But with C# the code does not get compiled....
In short we've got a base class, written in C#, with two virutal methods (same name, different sig)
Next we have a derrived class which overrides one of those methods.
The derrived class has been implemented both in C# as in VB.Net.
And the end of the line we have small console application that simply calls the methods on both derrived classes.
There are also two version of the console application, one in C# and one in VB.Net.
The VB.Net applications compiles and works perfectly.
The C# version does not even compile.
We've already found a solution : change the derrived class in VB.Net and add the overloads keyword (in addition to override) and then the C# version also works.
What I don't understand is why the VB.Net application worked in the first place and the C# did not...
And secondly, why does the overloads keyword need to be added to solve the issue? (we are overriding, not hiding)
Is that the right solution?
The base class (c#)
public abstract class BaseClass
public virtual string getMethodSig(int i)
return "string BaseClass.getMethodSig(int i)";
public virtual string getMethodSig(string s)
View Complete Post