Method TryParseNumberWithDelegates
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
stringString to convert
style
NumberStylesA bitwise combination of NumberStyles values that indicates the permitted format of
s
.provider
IFormatProviderAn object that supplies culture-specific formatting information about
s
.result
objectWhen 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
.