StringUtils.ParseFloat method

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

ParseFloat(string)

Static

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

public static float ParseFloat(string str)

Parameters

str String

The string to be parsed.

Returns

An instance of Single .

ParseFloat(string, int)

Static

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

public static float ParseFloat(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

An instance of Single .

ParseFloat(string, float)

Static

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

public static float ParseFloat(string str, float fallback)

Parameters

str String

The string to be parsed.

fallback Single

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

Returns

An instance of Single .