How can I use the ternary ? : condition to perform multiple operations, if expression is true/false?
wbsource = (exp) ? (Do one thing) : (Do secon
The conditional operator, which is a ternary operator (not a unary operator), is not a replacement for an if statement. It is an operator that returns one of two results. While you can chain this to some extent:
var result = someBool ? "a" : (otherBool ? "b" : "c");
That gets a little hard to read. Further, you're trying to call the Save() function, which does not return a result, hence you cannot use it with this operator.