OptionsCollection.TryParseInt Method

Tries to parse a setting of type Int32 from a string.

Definition

Namespace: SMath.Manager
Assembly: SMath.Manager (in SMath.Manager.dll) Version: 1.73.9126.0
C#
protected static int TryParseInt(
	string name,
	int defaultValue = -1
)

Parameters

name  String
Input string to parse.
defaultValue  Int32  (Optional)
Default value to use if the format of input is not recognized.

Return Value

Int32
Either the parsed Int32 value or defaultValue if the input is not recognized.

See Also