Dim Days As Integer = Date.DaysInMonth(2008,2) Dim Count As Integer Dim Val As Date For i As integer = 1 To Days Val = New date(2008,2,i) If Val.DayofWeek > 0 AndAlso Val.DayofWeek < 6 Then Count = Count + 1 End If Next Output.Show("2008年2月的工作天数:" & Count)