OffsetDateTime.IsEqual(OffsetDateTime) 方法

定义

检查此日期时间的即时是否等于指定日期时间的实例。

[Android.Runtime.Register("isEqual", "(Ljava/time/OffsetDateTime;)Z", "", ApiSince=26)]
public bool IsEqual(Java.Time.OffsetDateTime? other);
[<Android.Runtime.Register("isEqual", "(Ljava/time/OffsetDateTime;)Z", "", ApiSince=26)>]
member this.IsEqual : Java.Time.OffsetDateTime -> bool

参数

other
OffsetDateTime

要比较的其他日期时间,而不是 null

返回

如果即时等于指定日期时间的即时,则为 true

属性

注解

检查此日期时间的即时是否等于指定日期时间的实例。 此方法不同于 compareTo(java.time.OffsetDateTime)和 equals(java.lang.Object)中的比较,因为它仅比较日期时间的即时。 这相当于使用 dateTime1.toInstant(.equals(dateTime2.toInstant());。

Java参考java.time.OffsetDateTime.isEqual

适用于