Is there a way to have the ternary operator do the same as this?:
if (SomeBool)
SomeStringProperty = SomeValue;
I could do this:
SomeStringProperty = someBool ? SomeValue : SomeStringProperty;
But that would fire the getter and settor for SomeStringProperty even when SomeBool is false (right)? So it would not be the same as the above statement.
I know the solution is to just not use the ternary operator, but I just got to wondering if there is a way to ignore the last part of the expression.