The right way to swap two variables, at the time this question was asked (1), is to use a temporary variable:
decimal tempDecimal = startAngle;
startAngle = stopAngle;
stopAngle = tempDecimal;
There you have it. No clever tricks, no maintainers of your code cursing you for decades to come, and no spending too much time trying to figure out why you needed it in one operation anyway since, at the lowest level, even the most complicated language feature is a series of simple operations.
Just a very simple, readable, easy to understand, temp = a; a = b; b = temp;
solution.
In my opinion, developers who try to use tricks to, for example, "swap variables without using a temp" or "Duff's device" are just trying to show how clever they are (and failing miserably).
I liken them to those who read highbrow books solely for the purpose of seeming more interesting at parties (as opposed to expanding your horizons).
Solutions where you add and subtract, or the XOR-based ones, are less readable and most likely slower than a simple "temporary variable" solution (arithmetic/boolean-ops instead of plain moves at an assembly level).
Do yourself, and others, a service by writing good quality readable code.
That's my rant. Thanks for listening :-)
As an aside, I'm quite aware this doesn't answer your specific question (and I'll apologise for that) but there's plenty of precedent on SO where people have asked how to do something and the correct answer is "Don't do it".
(1) Improvements to the language and/or .NET Core since that time have adopted the "Pythonic" way using tuples. Now you can just do:
(startAngle, stopAngle) = (stopAngle, startAngle);
to swap values. This almost won't change the underlying operations but it at least has the small advantage of not having to introduce a temporary named variable to your code. And, in fact, you can see it still using a temporary variable (by pushing/popping values to/from the stack) under the covers, with an (a, b) = (b, a)
statement:
IL_0005: ldloc.1 ; push b
IL_0006: ldloc.0 ; push a
IL_0007: stloc.2 ; t = pop (a)
IL_0008: stloc.0 ; a = pop (b)
IL_0009: ldloc.2 ; push t
IL_000a: stloc.1 ; b = pop (t)