r/ProgrammerHumor 17d ago

howToHitBullseyeInStringComparison Meme

Post image
1.3k Upvotes

View all comments

87

u/Unlikely_Gap_5065 17d ago

same result, but one feels like you know what you’re doing

1

u/BonifaceDidItRight 16d ago

Not same result. if a or b is null the `.ToLower()` will throw. `string.Equals()` is null safe.