Click or drag to resize

GuardIsNaturalNumber Method (Int32, String)

[This is preliminary documentation and is subject to change.]

Checks if value is a natural number

Namespace:  CSInfrastructure.CodeContracts
Assembly:  CSInfrastructure (in CSInfrastructure.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax
C#
public static int IsNaturalNumber(
	int value,
	string paramName
)

Parameters

value
Type: SystemInt32
The number to check
paramName
Type: SystemString
The name of the parameter being checked

Return Value

Type: Int32
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionThrown when value does not fall within 0 and MaxValue
Remarks
Natural numbers are 0,1,2,3,4,...
See Also