csharp
csharp copied to clipboard
introduce compound assignments for mathematical operators
The flag-enums exercise introduces the concepts of compound assignments and has the following in its after.md file:
The bitwise operators can also be used as [compound assignments][compound-assignment], which are a shorthand notation where
x = op ycan be written asx op= y:
We should introduce compound assignment in the numbers exercise's after.md document instead (the above text can remain in the flag-enums after.md file). In the after.md document of the numbers exercise, we should introduce compound assignments and use the ones with mathematical operators like +=, -=, etc as examples.
Furthermore, the compound-assignment concept in the languages/csharp/config.json file should be moved from the flag-enums exercise to the numbers exercise.
edit: updated
I think flag-enums is a bit too niche to use for compound operators.
What about numbers? arrays is a bit crowded and we don't want too much in basics.
Alternatively, I don't see numeric literals covered anywhere (incl. hex format). Perhaps we have enough for an arithmetic exercise.
I like numbers best too! I've updated the issue.