Method TryParseInt
TryParseInt(String)
Attempts to parse a string to a Maybe<T> of System.Int32. If the parse fails (or source
is null) an empty maybe is returned.
Declaration
public static Maybe<int> TryParseInt(this string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | The string to parse. |
Returns
Type | Description |
---|---|
Maybe<System.Int32> | A Maybe<T> containing a valid Int32 value parsed from the string, or an empty maybe instance if the parse failed. |