StringExtensions.ToDouble method

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

ToDouble(string)

Extension method

Converts input to an instance of Double . If the conversion fails, 0 will be returned instead.

public static double ToDouble(this string input)

Parameters

input String

The input string to be converted.

Returns

An instance of Double .

ToDouble(string, double)

Extension method

Converts input to an instance of Double . If the conversion fails, fallback will be returned instead.

public static double ToDouble(this string input, double fallback)

Parameters

input String

The input string to be converted.

fallback Double

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

Returns

An instance of Double .