StringUtils.ParseInt32 method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Strings
Assembly Skybrud.Essentials.dll

ParseInt32(string)

Static

Parses the specified str into an instance of int . If the parsing fails, the default value of int will be returned instead.

public static int ParseInt32(string str)

Parameters

str String

The string to be parsed.

Returns

int

An instance of int .

ParseInt32(string, int)

Static

Parses the specified str into an instance of int . If the parsing fails, fallback will be returned instead.

public static int ParseInt32(string str, int fallback)

Parameters

str String

The string to be parsed.

fallback int

The fallback value that will be returned if the parsing fails.

Returns

int

An instance of int .