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

C# Equivalent to VB Operator Overloading

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
public class SomeType
    private int IntValue;

    public static int operator +(SomeType X, SomeType Y)
        return X.IntValue + Y.IntValue;

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

Copyright © 2004 – 2021 Tangible Software Solutions, Inc.