int class : Inc(int) method
Description
After returning a new instance with the current value, increment the value of the caller instance by the argument.
Syntax
intInstance.Inc(int incvalue)
Arguments
Class | Name | Description |
int | incvalue | Increment value. |
Return value
Class | Description |
int | A new instance with the same value as the caller instance. |
Sample code
int caller = 5;
int newInstance = caller.Inc(3);
// newInstance == 5 / caller == 8
Notes
An exception is raised if the instance value exceeds the maximum of int.
Links for reference
None