OptionsCollection.TryParseInt Method
Tries to parse a setting of type
Int32 from a string.
Namespace: SMath.ManagerAssembly: SMath.Manager (in SMath.Manager.dll) Version: 1.73.9126.0
protected static int TryParseInt(
string name,
int defaultValue = -1
)
Protected Shared Function TryParseInt (
name As String,
Optional defaultValue As Integer = -1
) As Integer
protected:
static int TryParseInt(
String^ name,
int defaultValue = -1
)
static member TryParseInt :
name : string *
?defaultValue : int
-> int
- name String
- Input string to parse.
- defaultValue Int32 (Optional)
- Default value to use if the format of input is not recognized.
Int32Either the parsed
Int32 value or
defaultValue if the input is not recognized.