Assignment operators

  • Thread starter Thread starter Kenneth Porter
  • Start date Start date
Kenneth said:
Is there a way to define a modifying assignment operator (eg. *= or
+=) so that it can be used by a C# client?

I'm trying to puzzle out section 19.7.5.4 of ECMA-372 and can't tell
if this is possible. I think it says that such operators can only be
used by C++ clients, not other .NET languages. Googling for examples
hasn't turned up anything.

http://www.ecma-international.org/publications/standards/Ecma-372.htm

I think it is not possible, as C# decomposes the compound assignment into
the binary operator followed by bitwise copy.
 
Back
Top