Table of Contents

Method IncrementIfOdd

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

IncrementIfOdd(int)

Increments the given number by 1 if it is odd; otherwise, returns the number unchanged.

public static int IncrementIfOdd(int number)

Parameters

number int

The integer to check and possibly increment.

Returns

int

The incremented number if it is odd; otherwise, the original number.