Brought to you by The Department Of Unnecessary Code

Another nicety that I happened upon, this time from the C# realm. The names were changed to protect the innocent.

theClass.uniqueID = (id != null) ? id : null;

Looks like someone just figured out how to use the ternary operator and was determined to use it.

Leave a Reply