1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Public Sub New()
'
' The InitializeComponent() call is required for Windows Forms designer support.
'
InitializeComponent()
'
' TODO: Add constructor code after the InitializeComponent() call.
'
Dim x1 As New DateTime(2008, 5, 2)
Dim x2 As New DateTime(2005, 5, 2)
Dim x3 As New DateTime(2006, 5, 2)
Dim min As DateTime = MinDates(MinDates(x1, x2), x3)
MessageBox.Show(min.ToShortDateString())
End Sub
Private Function MinDates(i1 As DateTime, i2 As DateTime) As DateTime
If i1 <= i2 Then
Return i1
Else
Return i2
End If
End Function |
Partager