With the ternary operator, it is possible to do something like the following (assuming Func1() and Func2() return an int:
int x = (x == y) ? Func1() : Func2();
However, is there any way to do the same thing, without returning a value? For example, something like (assuming Func1() and Func2() return void):
(x == y) ? Func1() : Func2();
I realise this could be accomplished using an if statement, I just wondered if there was a way to do it like this.