How to count the number of days in a specific month and specific year with VB.NET

1 Answer

0 votes
Module Module1

    Sub Main()

        Console.WriteLine(Date.DaysInMonth(2018, 2))
        Console.WriteLine(Date.DaysInMonth(2017, 2))
        Console.WriteLine(Date.DaysInMonth(2016, 2))
        Console.WriteLine(Date.DaysInMonth(2015, 2))

    End Sub

End Module

' run:
' 
' 28
' 28
' 29
' 28

 



answered Sep 19, 2018 by avibootz
...