c# one line if then else code example Example: c# if statement one line someValue = condition ? newValue : someValue;