|
|
|
|
|
by jeroenhd
1253 days ago
|
|
It's easy to read, simple to maintain, and performant code. Maybe one of those newer switch expressions would make the code even clearer, but they already left the redundant lower bound checks in so I think the way this looks is quite intentional. Much easier to read than `int count = (int)Math.Floor(percentage / 10); return new String("#", count) + new String("-", 10 - count));` in my opinion and not worth writing a custom progress component for. |
|
I had the honour of being able to review this under NDA before it was made public (pro bono, and limited to static analysis and an hour poking around suspicious looking classes). I've seen a lot of .Net code in my time and this was surprisingly good. Sure there are things which could be improved, but you'll find an order of magnitude more issues in most other code (especially dynamic languages, which are magnets inadvertent issues affecting correctness).