This project is read-only.
1

Resolved

Methods imported from VB assembly are not correctly marked as "explicit interface implementations"

description

Consider the following C# source:
public class FooCS : System.IDisposable
{
    void System.IDisposable.Dispose() {}
}
And roughly equivalent VB source:
Public Class FooVB
    Implements System.IDisposable

    Private Sub MyDisposeMethod() Implements System.IDisposable.Dispose
    End Sub
End Class
I compile the first into a DLL with csc /target:library /out:FooCS.dll FooCS.cs and the second with vbc /target:library /out:FooVB.dll FooVB.vb. I then create a Roslyn CSharpCompilation that references both assemblies and both types.

Roslyn reports that FooCS.System.IDisposable.Dispose has method kind ExplicitInterfaceImplementation and that FooVB.MyDisposeMethod is Ordinary.

Is this correct?

comments

VSadov wrote Nov 20, 2014 at 9:31 PM

This is ByDesign. If a method can be addressed by its name, it is not considered an explicit implementation and VB implements have perfectly normal names.