In C++ the ternary operator below will return 1.

true ? 0 : 1

In C# it will return 0.

If the following is written in C++

int x = ((a < b) ? 1 : ((a > b) ? -1 : 0));

what the heck is the equivalent in C#?

I thought it might be

int x = ((a > b) ? 1 : ((a < b) ? -1 : 0));

I would like someone who knows for certain to confirm.

In C++ the ternary operator below will return 1.

true ? 0 : 1

In C# it will return 0.

You need to recheck that, it returns 0 in C, C++ and C#.

Ah yes, sorry.

The problem must be something else... :)