IEra.ITemporalAccessor.GetLong(ITemporalField) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the value of the specified field from this era as a long
.
[Android.Runtime.Register("getLong", "(Ljava/time/temporal/TemporalField;)J", "GetGetLong_Ljava_time_temporal_TemporalField_Handler:Java.Time.Chrono.IEra, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
override sealed long ITemporalAccessor.GetLong (Java.Time.Temporal.ITemporalField? field);
[<Android.Runtime.Register("getLong", "(Ljava/time/temporal/TemporalField;)J", "GetGetLong_Ljava_time_temporal_TemporalField_Handler:Java.Time.Chrono.IEra, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Java.Time.Temporal.ITemporalAccessor.GetLong : Java.Time.Temporal.ITemporalField -> int64
override this.Java.Time.Temporal.ITemporalAccessor.GetLong : Java.Time.Temporal.ITemporalField -> int64
Parameters
- field
- ITemporalField
the field to get, not null
Returns
the value for the field
Implements
- Attributes
Remarks
Gets the value of the specified field from this era as a long
.
This queries this era for the value of the specified field. If it is not possible to return the value, because the field is not supported or for some other reason, an exception is thrown.
If the field is a ChronoField
then the query is implemented here. The ERA
field returns the value of the era. All other ChronoField
instances will throw an UnsupportedTemporalTypeException
.
If the field is not a ChronoField
, then the result of this method is obtained by invoking TemporalField.getFrom(TemporalAccessor)
passing this
as the argument. Whether the value can be obtained, and what the value represents, is determined by the field.
Java documentation for java.time.chrono.Era.getLong(java.time.temporal.TemporalField)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.