看了别人写的C#的 自己转了一下 然后后重新改了改 写成了这个 另外还有一个我写的验证日期是否合法的代码 在后面 都是vb的 c#只会看不会写 '判断闰年======================= Private Function CheckLeap(ByVal year As Integer) As Boolean If (year Mod 4 = 0) AndAlso (year Mod 100 <> 0) OrElse (year Mod 400 = 0) Then Return True Else Return False End If End Function '判断闰年结束======================= '绑定每月的天数===================== Private Sub BindDays(ByVal year As Integer, ByVal month As Integer) Dim i As Integer Dim AlDay As New ArrayList() Select Case month Case 1, 3, 5, 7, 8, 10