I hope this is the appropriate forum to ask this question.
A group of colleagues and I just starting learning C# a few weeks ago and we are planning on having a discussion about language interoperability.
So, I am looking for known/classical examples of .Net language interoperability issues. Like this one, where the case-insensitiveness of VB.Net makes an overloaded C# method incompatible.
In C#
public class Foo
{
public void foo() { }
public void fOO() { }
}
In VB.Net
Public Class Bar
Sub Bar()
Dim foo As Foo
foo = New Foo()
foo.foo(); //compiler error
End Sub
End Class
Or this one in which a VB.Net keyword is used in a C# method name:
In C#
public class Foo
{
public virtual void Stop() { }
}
In VB.Net
Public Class Bar
Inherits Foo
Public Overrides Sub Stop() 'compiler error
End Sub
End Class
I would love to gather a few more examples of this type of issues.
Does anyone know any other interesting cases of language interoperability gotchas?
I used C# and VB.Net in these examples, but any .Net language interoperability issue will be just as good to enrich a discussion on the subject.