formula output is always zero point zero
hi, i'm using progress bar , loop, inside is:
double prog = 0;
for (int = 0; <= count - 1; i++) { prog = ((i + 1) / count) * 100; backgroundworker.reportprogress(prog); }
but problem is, progressbar not updating, when put breakpoint on prog variable, show 0.0 output, why this.
i'm puzzled, please help. thanks!
always remember "thanks", clicking "mark answer" , "vote helpful" if post answers question.
hi, nevermind, solved it, declare 1 of digits double. :)
prog = ((i + 1) / (double)count) * 100;
well can explain me why work? :)
always remember "thanks", clicking "mark answer" , "vote helpful" if post answers question.
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment