public class Test
public Shared Sub Main
Console.WriteLine(Min(10.1, 10))
Console.WriteLine(Min("last", "first"))
Console.WriteLine(Min(#1/1/2000#, #3/4/2000#))
End Sub
Overloads Shared Function Min(ByVal dblA As Double, ByVal dblB As Double) As Double
Min = IIf(dblA < dblB, dblA, dblB)
End Function
Overloads Shared Function Min(ByVal strA As String, ByVal strB As String) As String
Min = IIf(strA < strB, strA, strB)
End Function
Overloads Shared Function Min(ByVal dteA As Date, ByVal dteB As Date) As Date
Min = IIf(dteA < dteB, dteA, dteB)
End Function
End class
|