DEV Community

Discussion on: C# Dictionary: Add or [key]=value?

Collapse
 
peledzohar profile image
Zohar Peled • Edited

More accurately: [key]=value is still an "add or update", but x =+ y means x = x + y - "get x, add y to it, and set that value to x" - so yeah, it's the operator.
This is also true with dict[key]=value++ and ++dict[key]=value.