I need to combine a switch with an if-statement.
How can I do that? I want to do something like this:
switch (periodtype)
{
if(starttime>endtime)
{
;
}
else
{
case 0: nextRunTime = nextRunTime.AddHours(period); break;
case 1: nextRunTime = nextRunTime.AddMinutes(period); break;
case 2: nextRunTime = nextRunTime.AddSeconds(period); break;
}
}