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

VB Equivalent to C# Operator Overloading

C# VB
public class SomeType
{
    private int IntValue;

    public static int operator +(SomeType X, SomeType Y)
    {
        return X.IntValue + Y.IntValue;
    }
}
Public Class SomeType
    Private IntValue As Integer

    Public Shared Operator +(ByVal X As SomeType, ByVal Y As SomeType) As Integer
        Return X.IntValue + Y.IntValue
    End Operator
End Class


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


Copyright © 1997 – 2017 Tangible Software Solutions Inc.