I have this method:
public static int SetFlag(this int i, int flag, bool set = true)
{
return (set) ? i | flag : ((i & flag) != 0) ? (i-flag) : i;
if(
}
Just wondering how to read it. Is it saying there are 2 ternary condictions? Do I read it from right to left or left to right?
That code is equivalent to: