I have a nullable bool. What is a quick way to invert it. In otherwords if value is TRUE make it FALSE, otherwise make it TRUE.
To clarify (from the comments):
Expected behavior is: if the nullable bool has a value, then invert, otherwise should return null.
myBool = !myBool;Edit: OK, based on a refined understanding of the question (i.e.
myBoolsays null if it was null), the above is the simplest answer.