Java.Util.GregorianCalendar.Roll Method
Increments or decrements the specified field and wraps the value of the field when it goes beyond the maximum or minimum value for the current date.

Syntax

[Android.Runtime.Register("roll", "(IZ)V", "GetRoll_IZHandler")]
public override void Roll ([Android.Runtime.GeneratedEnum] CalendarField field, bool increment)

Parameters

field
the field to roll.
increment
true to increment the field, false to decrement.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif an invalid field is specified.

Remarks

Increments or decrements the specified field and wraps the value of the field when it goes beyond the maximum or minimum value for the current date. Other fields will be adjusted as required to maintain a consistent date. For example, March 31 will roll to April 30 when rolling the month field.

[Android Documentation]

Requirements

Namespace: Java.Util
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1