Table of Contents

Method TryParseNumberWithDelegates

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

TryParseNumberWithDelegates(string?, NumberStyles, IFormatProvider?, out object?, IEnumerable<TryParseNumberDelegate>)

Uses collection of TryParseNumberDelegate delegates in order to convert string to a number.

public static bool TryParseNumberWithDelegates(string? s, NumberStyles style, IFormatProvider? provider, out object? result, IEnumerable<TryParseNumberDelegate> delegates)

Parameters

s string

String to convert

style NumberStyles

A bitwise combination of NumberStyles values that indicates the permitted format of s.

provider IFormatProvider

An object that supplies culture-specific formatting information about s.

result object

When this method returns and if the conversion succeeded, contains a number equivalent of the numeric value or symbol contained in s. Contains default value for the type if the conversion failed.

delegates IEnumerable<TryParseNumberDelegate>

Collection of delegates used for the conversion.

Returns

bool

true if s was converted successfully; otherwise, false.