2
Answers

C#.Net - Setting the prototypes' initital start state

ablivian

ablivian

20y
2.2k
1
All, Any ideas would be most appreciated! I wish for my completed prototype to run at Windows start-up but be minimised to the System Tray, not the Task Bar. I have browsed through all the possible settings for the forms start state but to no avail. Am I clutching at straws and should I be looking elsewhere? Cheers, Paul A Worthington BSc Hon Computer Science
Answers (2)
0
Nir Bar
NA 773 0 15y
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