When used correctly, operator procedures can make a developer’s life a lot easier. But at the same time, bear in mind that there are some situations where implementing operator procedures can cause errors.
This chapter’s SuperString example added operator procedures to a structure, which is a value type. The operator procedures also accepted value types. Now take a closer look at one of the calculation operator procedures:
Public Shared Operator +(ByVal sstring1 As SuperString, ByVal sstring2 As SuperString) As SuperString Return sstring1.Add(sstring2) End Operator
Here, the ...