Although some answers let you believe that the operator is only compatible with giving boolean results (which would actually not be very useful at all) it gives you a short notation for a simple if/then/else construction.
It would be no help if you substituted this:
return value > 0;
by this:
return value > 0 ? true : false;
It would mean that your code would get longer instead of shorter. The '?' operator is meant to return any type based on the value of a boolean.
For example:
return value > 0 ? "the value is greater than zero", "the value is equal or lower than zero";
return value > 0 ? 1 : -1;
But using it holds minor and major risks that you need to be aware of. This is because both expressions are evaluated.
This example always creates one object that will be unused:
return compressed ? new JpegImage() ? BitmapImage();
This example goes wrong if value is zero because
size / value
is evaluated anyway:
return value > 0 ? size / value : size;
Now just another example that would be a major bug in your software. Would the record exists, even if the action is t update the record?
return action == update ? UpdateRecord(record) : DeleteRecord(record);
Good luck!