Hi group, i have a method in my class with the following code:
private double GetCompletedPer centage(TimeSpa n totalTime, TimeSpan
budgetedTime)
{
double totalMinutes = totalTime.Total Minutes;
double budgetedMinutes = budgetedTime.To talMinutes;
return Math.Round((tot alMinutes * 100) / budgetedMinutes ,2);
}
Sometimes, budgetedMinutes is zero, but the result of the operation in
infinite?? why is that?? Can I check against a constant or something to
see if it's infinite?? I know, i can check if budgetedMinutes == then
return something, but i'm curious.
Thanks in advance
private double GetCompletedPer centage(TimeSpa n totalTime, TimeSpan
budgetedTime)
{
double totalMinutes = totalTime.Total Minutes;
double budgetedMinutes = budgetedTime.To talMinutes;
return Math.Round((tot alMinutes * 100) / budgetedMinutes ,2);
}
Sometimes, budgetedMinutes is zero, but the result of the operation in
infinite?? why is that?? Can I check against a constant or something to
see if it's infinite?? I know, i can check if budgetedMinutes == then
return something, but i'm curious.
Thanks in advance
Comment