Given the expression below:
int variable = ++d >3 ?0:d;
What is the best way to write this as an if-else statement?? What is this code trying to do? What is good about using this approach? Why it is bad?© BrainMass Inc. brainmass.com October 10, 2019, 7:30 am ad1c9bdddf
Conditional ?: Operator implementation is attached.
This is short and compact when handling direct value comparisons and assignments, however it is not flexible as ...
This solution discusses on C# condition evaluation ?: statement. It shows the best way to write this as an if-else statement. It explains what the code is trying to do. What is good and bad about using this approach?