vb.net – 计算每月的天数

前端之家收集整理的这篇文章主要介绍了vb.net – 计算每月的天数前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
有没有办法计算一个月的天数?
是:
Const July As Integer = 7
Const Feb As Integer = 2

' daysInJuly gets 31. '
Dim daysInJuly As Integer = System.DateTime.DaysInMonth(2001,July)

' daysInFeb gets 28 because the year 1998 was not a leap year. '
Dim daysInFeb As Integer = System.DateTime.DaysInMonth(1998,Feb)

' daysInFebLeap gets 29 because the year 1996 was a leap year. '
Dim daysInFebLeap As Integer = System.DateTime.DaysInMonth(1996,Feb)

信用额度为MSDN.

原文链接:https://www.f2er.com/vb/255314.html

猜你在找的VB相关文章