• Saves Valuable Time
  • Trusted Accuracy since 2004
  • 15-Day Money-Back Guarantee

C# Equivalent to VB Extension Methods

VB extension methods use the 'Extension' attribute, while C# extension methods use the 'this' keyword on the first parameter.

Public Module Foo
    <System.Runtime.CompilerServices.Extension> _
    Public Sub Extension(ByVal myParam As String)
    End Sub
End Module
public static class Foo
    public static void Extension(this string myParam)

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

Additional resource: VB.NET and C# Equivalents

Copyright © 2004 – 2021 Tangible Software Solutions, Inc.