I found this statement is some old code and it took me a second to figure out…
IsTestActive = (TestStateID == 1 ? true : false);
Please correct me if I’m wrong but isn’t this the same as this one?:
IsTestActive = (TestStateID == 1);
If it is, why would you ever want to use the first? Which one is more readable? (I think the latter, but I’d like to see what others think.)
Yes, it is exactly the same.
Yes, the latter is more readable.