[c#] One-liner if statements, how to convert this if-else-statement