I am new to this forum and C# programming.Working on this project where I have to return time interval as a double after if control statement finished. Code snippet is below. Please tell me what I am doing wrong. It's not returning d
;
public double GetInterval()
{
double d;
DateTime now = new DateTime();
if (cb5Min.Checked)
{
d = ((60 - now.Second) * 1000 - now.Millisecond);
}
else if (cb15Min.Checked)
{
d= ((900 - now.Second) * 1000 - now.Millisecond);
}
return d;
}