Mostly In One Line
by in Coded Smorgasbord on 2024-06-19Today's a day for a smorgasbord. We're going to start with a classic kind of bad code, from astephens:
pbUpdates.Value = int.Parse(Math.Truncate(percentage).ToString());
Inspired by the Pop-up Potpourri, the examples presented here aren't necessarily "bad" code nor do they imply the miserable failure that we're all used to reading here. The examples are more-or-less fun snippets of code like ones that we've all written at one time or another.