本文整理汇总了C#中BigDecimal.CompareBigDecimal方法的典型用法代码示例。如果您正苦于以下问题:C# BigDecimal.CompareBigDecimal方法的具体用法?C# BigDecimal.CompareBigDecimal怎么用?C# BigDecimal.CompareBigDecimal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BigDecimal
的用法示例。
在下文中一共展示了BigDecimal.CompareBigDecimal方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LessThanOrEqual
public static object LessThanOrEqual(BigDecimal/*!*/ self, [NotNull]BigDecimal/*!*/ other) {
int? c = self.CompareBigDecimal(other);
if (c.HasValue) {
return c.Value <= 0;
} else {
return null;
}
}
示例2: GreaterThan
public static object GreaterThan(RubyContext/*!*/ context, BigDecimal/*!*/ self, int other) {
int? c = self.CompareBigDecimal(BigDecimal.Create(GetConfig(context), other));
if (c.HasValue) {
return c.Value > 0;
} else {
return null;
}
}
示例3: LessThan
public static object LessThan(RubyContext/*!*/ context, BigDecimal/*!*/ self, [NotNull]BigInteger/*!*/ other) {
int? c = self.CompareBigDecimal(BigDecimal.Create(GetConfig(context), other));
if (c.HasValue) {
return c.Value < 0;
} else {
return null;
}
}
示例4: Compare
public static object Compare(RubyContext/*!*/ context, BigDecimal/*!*/ self, double other) {
return self.CompareBigDecimal(BigDecimal.Create(GetConfig(context), other));
}
示例5: LessThanOrEqual
public static object LessThanOrEqual(RubyContext/*!*/ context, BigDecimal/*!*/ self, double other) {
return LessThanOrEqualResult(self.CompareBigDecimal(BigDecimal.Create(GetConfig(context), other)));
}
示例6: GreaterThanOrEqual
public static object GreaterThanOrEqual(RubyContext/*!*/ context, BigDecimal/*!*/ self, [NotNull]BigInteger/*!*/ other) {
return GreaterThanOrEqualResult(self.CompareBigDecimal(BigDecimal.Create(GetConfig(context), other)));
}
示例7: GreaterThan
public static object GreaterThan(RubyContext/*!*/ context, BigDecimal/*!*/ self, double other) {
return GreaterThenResult(self.CompareBigDecimal(BigDecimal.Create(GetConfig(context), other)));
}