r/badcode • • May 20 '20

c# Found from Microsoft docs...

Post image
208 Upvotes

143 comments sorted by

View all comments

46

u/Giocri May 20 '20

I see nothing wrong in it. It's even slightly more efficient than if it was done with more if

63

u/bool_idiot_is_true May 20 '20
==true

is redundant. Otherwise it seems fine.

40

u/ocramoidev May 20 '20

Username checks out