Custom Operators

New operators are declared at a global level using the operator keyword, and are marked with the prefixinfix or postfix modifiers:

  1. prefix operator +++

The following example defines a new custom infix operator called +-, which belongs to the precedence group AdditionPrecedence:

  1. infix operator +-: AdditionPrecedence
原文地址:https://www.cnblogs.com/feng9exe/p/9661177.html