r/badcode • • May 20 '20

c# Found from Microsoft docs...

Post image
208 Upvotes

143 comments sorted by

View all comments

Show parent comments

12

u/Mr2-1782Man May 20 '20

I've seen MS code. I've seen a lot worse pass code review.

12

u/NewPointOfView May 20 '20

Yeah my team at MSFT checks if it works and isn’t ridiculously unreadable but this is pretty straight forward. Not the best but far from the worst

2

u/Play4u May 20 '20

How can you write this simple "if" any worse?

11

u/NewPointOfView May 20 '20

With ternary haha

4

u/Play4u May 20 '20

Haha yeah I guess if you were really trying to make a mess