Home News DOC Class DL Others Cooker
Class  >  int  >  Inc()
int class : Inc() method

Description

After returning a new instance with the current value, increment the value of the caller instance by one.

Syntax

intInstance.Inc()

Arguments

None

Return value

ClassDescription
intA new instance with the same value as the caller instance.

Sample code

int caller = 5;

int newInstance = caller.Inc();

// newInstance == 5 / caller == 6

Notes

An exception is raised if the instance value exceeds the maximum of int.

Links for reference

None

Copyright © Rice All rights reserved.