One of those ‘doh’ moments

There are times when you feel really proud of yourselves; on top of the world, with no one in sight. And then there are times when you can’t believe you did what you just did. Here’s one of the latter :- My task was to show a progress bar in our application. Nothing fancy there – just division of the operations to be performed into equal size chunks and Incrementing after completion of each task. Very straightforward indeed. int increment; private void Form_Load(object sender, EventArgs e) { int discreteOperationsCount = GetDiscreteOperationsCount(); increment = (int)Math.Ceil((double)progressBar.Maximum / discreteOperationsCount); } private void OperationCompleted() … Continue reading One of those ‘doh’ moments