ITemporalAccessor.Get(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 as an int
.
[Android.Runtime.Register("get", "(Ljava/time/temporal/TemporalField;)I", "GetGet_Ljava_time_temporal_TemporalField_Handler:Java.Time.Temporal.ITemporalAccessor, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual int Get (Java.Time.Temporal.ITemporalField? field);
[<Android.Runtime.Register("get", "(Ljava/time/temporal/TemporalField;)I", "GetGet_Ljava_time_temporal_TemporalField_Handler:Java.Time.Temporal.ITemporalAccessor, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Get : Java.Time.Temporal.ITemporalField -> int
override this.Get : Java.Time.Temporal.ITemporalField -> int
Parameters
- field
- ITemporalField
the field to get, not null
Returns
the value for the field, within the valid range of values
- Attributes
Remarks
Gets the value of the specified field as an int
.
This queries the date-time for the value of the specified field. The returned value will always be within the valid range of values for the field. If the date-time cannot return the value, because the field is unsupported or for some other reason, an exception will be thrown.
Java documentation for java.time.temporal.TemporalAccessor.get(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.