For the efficiency, I would usually do something similar to original code.
For elegance, you could write:
var c = Math.Max(a, b);
var d = Math.Min(a, b);
Alternatively, the following patern could sometime also be used:
var c = a;
var d = b;
if (c < d)
{
var temp = c;
c = d;
d = temp;
}
In pratice, it does not mattern much for simple cases like that. When code become more complex, some solutions will become more appropriate.