3

Genuine 1 line function found in a production system:

private bool NotExists(int typeId) {
return !collection.Any(item => item.typeId == typeId) ? false : true;
}

I can't decide how many double negatives are involved here!

Comments
  • 1
    Well... The ternary operator is the one killing me! Why!?

    *Cried a little inside*
Add Comment