Compare two TimeSpan values : Data Type « Data Types « VB.Net






Compare two TimeSpan values

 

Imports System

Class Sample
    Public Shared Sub Main()
        Dim l1 As TimeSpan = New TimeSpan(), l2 As TimeSpan = New TimeSpan()
        Console.WriteLine(l1.CompareTo(l2))
        Console.WriteLine(l1.CompareTo(CObj(l2)))
    End Sub 'Main

End Class

   
  








Related examples in the same category

1.Value type and Reference typeValue type and Reference type
2.A custom function to return inches from passed in centimeter value
3.Compare two boolean values
4.Compare two Byte values
5.Compare two Int16 numbers
6.Compare two Int32 values
7.Compare two Int64 values
8.Compare two Decimal values
9.Compare two Single values
10.Compare two Double values
11.Compare two Char values
12.Compare two string values
13.Compare two DateTime values
14.Compare two Version values