VB operator overloading is similar to C++ operator overloading, except that VB operator overloads are static methods while C++ operator overloads are instance methods. During conversion by C++ to VB Converter, references to 'this' within the method are converted to the added first parameter.
int IntValue = 0;
int operator + (const SomeType &Y)
return this->IntValue + Y.IntValue;
|Public Class SomeType
Private IntValue As Integer = 0
Public Shared Operator + (ByVal ImpliedObject As SomeType, ByVal Y As SomeType) As Integer
Return ImpliedObject.IntValue + Y.IntValue
Use C++ to VB Converter to convert from C++ to VB.
VB.NET and C++ Equivalents
Copyright © 1997 – 2019 Tangible Software Solutions, Inc.