int class : Dec() method
Description
After returning a new instance with the current value, decrement the value of the caller instance by one.
Syntax
intInstance.Dec()
Arguments
None
Return value
Class | Description |
int | A new instance with the same value as the caller instance. |
Sample code
int caller = 5;
int newInstance = caller.Dec();
// newInstance == 5 / caller == 4
Notes
An exception is raised if the instance value exceeds the minimum of int.
Links for reference
None