StringExtensions.IsFloat method

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

IsFloat(string)

Extension method

Gets whether the string matches a float (Single ).

public static bool IsFloat(this string str)

Parameters

str String

The string to validate.

Returns

true if str matches a float; otherwise false.

IsFloat(string, out float)

Extension method

Gets whether the string matches a float (Single ).

public static bool IsFloat(this string str, float result)

Parameters

str String

The string to validate.

result Single

The converted value str matches a Single ; otherwise 0.

Returns

true if str matches a float; otherwise false.