本文整理汇总了VB.NET中System.Decimal.GreaterThan操作符的典型用法代码示例。如果您正苦于以下问题:VB.NET Decimal.GreaterThan操作符的具体用法?VB.NET Decimal.GreaterThan怎么用?VB.NET Decimal.GreaterThan使用的例子?那么恭喜您, 这里精选的操作符代码示例或许可以为您提供帮助。您也可以进一步了解该操作符所在类System.Decimal
的用法示例。
在下文中一共展示了Decimal.GreaterThan操作符的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Main
Module Example
Public Sub Main()
Dim number1 As Decimal = 16354.0699d
Dim number2 As Decimal = 16354.0695d
Console.WriteLine("{0} > {1}: {2}", number1,
number2, number1 > number2)
number1 = Decimal.Round(number1, 2)
number2 = Decimal.Round(number2, 2)
Console.WriteLine("{0} > {1}: {2}", number1,
number2, number1 > number2)
End Sub
End Module
输出:
16354.0699 > 16354.0695: True 16354.07 > 16354.07: False
示例2: Example
Module Example
Public Sub Main()
Dim number1 As Decimal = 16354.0699d
Dim number2 As Decimal = 16354.0695d
Console.WriteLine("{0} > {1}: {2}", number1, number2,
Decimal.op_GreaterThan(number1, number2))
number1 = Decimal.Round(number1, 2)
number2 = Decimal.Round(number2, 2)
Console.WriteLine("{0} > {1}: {2}", number1, number2,
Decimal.op_GreaterThan(number1, number2))
End Sub
End Module
输出:
16354.0699 > 16354.0695: True 16354.07 > 16354.07: False