• Saves Valuable Time
  • Trusted Accuracy for 12 Years
  • 15-Day Money-Back Guarantee

VB Equivalent to C# Interfaces

Defining Interfaces

C# VB.NET
public interface IFoo
{
    void Method();
}
Public Interface IFoo
    Sub Method()
End Interface

Implementing Interfaces

C# VB.NET
//implicit implementation:
public class Foo : IFoo
{
    public void Method()
    {
    }
}

//explicit implementation:
public class Foo : IFoo
{
    void IFoo.Method()
    {
    }
}
Public Class Foo
    Implements IFoo

    Public Sub Method() Implements IFoo.Method
    End Sub
End Class


Use Instant VB to convert from C# to VB.NET.     

Additional resource: VB.NET and C# Equivalents


Copyright © 1997 – 2017 Tangible Software Solutions Inc.