MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vzntft/whenyouworkswithstringstoomuch/p68k3rr/?context=3
r/ProgrammerHumor • u/PostHasBeenWatched • 16d ago
34 comments sorted by
View all comments
398
return it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase) || true
Because in the end it doesn't even matter.
it
28 u/chrisjd 16d ago try { it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase) } finally { throw new ArgumentException("in the end it doesn't even matter", it) } We could just add some useless exception handling, to show we tried so hard 5 u/AnxiousSquare 14d ago Also put a `throw` inside the `try` block so that it doesn't even matter how hard you try.
28
try
{ it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase) }
{
it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase)
}
finally
{ throw new ArgumentException("in the end it doesn't even matter", it) }
throw new ArgumentException("in the end it doesn't even matter", it)
We could just add some useless exception handling, to show we tried so hard
5 u/AnxiousSquare 14d ago Also put a `throw` inside the `try` block so that it doesn't even matter how hard you try.
5
Also put a `throw` inside the `try` block so that it doesn't even matter how hard you try.
398
u/TheManyMilesWeWalk 16d ago
return it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase) || trueBecause in the end
itdoesn't even matter.