long class : Inc(long) method

Description

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

Syntax

longInstance.Inc(long incvalue)

Arguments

ClassNameDescription
longincvalueIncrement value.

Return value

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

Sample code

long caller = 5L;

long newInstance = caller.Inc(3L);

// newInstance == 5 / caller == 8

Notes

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

Links for reference

None

Copyright © Rice All rights reserved.