0
Hi Petre,
There isn't an automatic way of doing it.
I think the best way will be to count day-by-day in a loop:
int count = 0; for( DateTime d = dt1.Value.Date; d <= dt2.Value.Date; d = d.AddDays(1)) {
if(( d.DayOfWeek != DayOfWeek.Saturday) && (d.DayOfWeek != DayOfWeek.Sunday)) {
++count
}
} return count
|
Please mark this post as an answer if it helps you
Nir