Decimal.Compare Method Compares two specified Decimal values.
Imports System
Imports Microsoft.VisualBasic
Module DecCompareEqualsDemo
Sub CompareDecimals( Left as Decimal, Right as Decimal,RightText as String )
Console.WriteLine(Decimal.Equals( Left, Right ) )
Console.WriteLine(Decimal.Compare( Left, Right ) )
End Sub
Sub Main( )
Dim Left as New Decimal( 123.456 )
CompareDecimals( Left, New Decimal( 1.2345600E+2 ),"Decimal( 1.2345600E+2 )" )
End Sub
End Module
Related examples in the same category