+ = Operator in reflector?

I am trying to find +=in reflectorto see how they are implemented:

a=+1 vs a=a+1

but I can’t find him.

any help?

+3
source share
2 answers

There is +=no implementation for an operator anywhere, it is a pseudo- operator that is processed by the compiler. The C # compiler extends a += 1to a = a + 1.

The JIT compiler then creates the most efficient code for a = a + 1. If it is a simple variable, it will be just an instruction that increments the value.

+4
source

+= int : . IL.

DateTime , , Decimal.

+4

All Articles