I've inserted a variable of type Double in the application/settings file and I'm using a "while" loop to do a small calculation:
double final=0;
double cost = application.settings.default.cost; // 0.15
while(true)
{
Thread.Sleep(1000); //speeded up version of 60000 (1 minute)
final+=cost;
//code that waits for the user to quit the loop
}
the result after 1 hour should be 9.00 but it's calculating to something like 24.00 :/ however, if I hardcode the value in to the code, I get the desired result of 9.00
double final=0;
double cost = 0.15
while(true)
{
Thread.Sleep(1000); //speeded up version of 60000 (1 minute)
final+=cost;
//code that waits for the user to quit the loop
}
Any ideas?