OptionsCollection.TryParseBoolean Method

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

Definition

Namespace: SMath.Manager
Assembly: SMath.Manager (in SMath.Manager.dll) Version: 1.73.9126.0
C#
protected static bool TryParseBoolean(
	string name,
	bool defaultValue = false
)

Parameters

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

Return Value

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

See Also