Hi group, i have a method in my class with the following code:
private double GetCompletedPercentage(TimeSpan totalTime, TimeSpan
budgetedTime)
{
double totalMinutes = totalTime.TotalMinutes;
double budgetedMinutes = budgetedTime.TotalMinutes;
return Math.Round((totalMinutes * 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