INumberBase<TSelf>.TryParse Metoda

Definicja

Przeciążenia

TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, TSelf)

Próbuje przeanalizować zakres znaków UTF-8 w wartości.

TryParse(String, NumberStyles, IFormatProvider, TSelf)

Próbuje przeanalizować ciąg w wartości.

TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, TSelf)

Próbuje przeanalizować zakres znaków w wartości.

TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, TSelf)

Źródło:
INumberBase.cs
Źródło:
INumberBase.cs

Próbuje przeanalizować zakres znaków UTF-8 w wartości.

public:
 static override bool TryParse(ReadOnlySpan<System::Byte> utf8Text, System::Globalization::NumberStyles style, IFormatProvider ^ provider, [Runtime::InteropServices::Out] TSelf % result);
public static virtual bool TryParse (ReadOnlySpan<byte> utf8Text, System.Globalization.NumberStyles style, IFormatProvider? provider, out TSelf result);
static member TryParse : ReadOnlySpan<byte> * System.Globalization.NumberStyles * IFormatProvider * 'Self -> bool
Public Shared Overrides Function TryParse (utf8Text As ReadOnlySpan(Of Byte), style As NumberStyles, provider As IFormatProvider, ByRef result As TSelf) As Boolean

Parametry

utf8Text
ReadOnlySpan<Byte>

Zakres znaków UTF-8 do analizy.

style
NumberStyles

Bitowa kombinacja stylów liczbowych, które mogą być obecne w .utf8Text

provider
IFormatProvider

Obiekt, który udostępnia informacje o formatowaniu specyficznym dla kultury.utf8Text

result
TSelf

Po powrocie utf8Text zawiera wynik pomyślnego analizowania lub niezdefiniowanej wartości w przypadku błędu.

Zwraca

truejeśli utf8Text została pomyślnie przeanalizowana; w przeciwnym razie . false

Wyjątki

style nie jest obsługiwaną NumberStyles wartością.

Dotyczy

TryParse(String, NumberStyles, IFormatProvider, TSelf)

Źródło:
INumberBase.cs
Źródło:
INumberBase.cs
Źródło:
INumberBase.cs

Próbuje przeanalizować ciąg w wartości.

public:
 static bool TryParse(System::String ^ s, System::Globalization::NumberStyles style, IFormatProvider ^ provider, [Runtime::InteropServices::Out] TSelf % result);
public static abstract bool TryParse (string? s, System.Globalization.NumberStyles style, IFormatProvider? provider, out TSelf result);
static member TryParse : string * System.Globalization.NumberStyles * IFormatProvider * 'Self -> bool
Public Shared Function TryParse (s As String, style As NumberStyles, provider As IFormatProvider, ByRef result As TSelf) As Boolean

Parametry

s
String

Ciąg do analizy.

style
NumberStyles

Bitowa kombinacja stylów liczbowych, które mogą być obecne w .s

provider
IFormatProvider

Obiekt, który udostępnia informacje o formatowaniu specyficznym dla kultury.s

result
TSelf

Po powrocie zawiera wynik pomyślnie przeanalizowanej s lub niezdefiniowanej wartości w przypadku błędu.

Zwraca

truejeśli s została pomyślnie przeanalizowana; w przeciwnym razie . false

Wyjątki

style nie jest obsługiwaną NumberStyles wartością.

Dotyczy

TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, TSelf)

Źródło:
INumberBase.cs
Źródło:
INumberBase.cs
Źródło:
INumberBase.cs

Próbuje przeanalizować zakres znaków w wartości.

public:
 static bool TryParse(ReadOnlySpan<char> s, System::Globalization::NumberStyles style, IFormatProvider ^ provider, [Runtime::InteropServices::Out] TSelf % result);
public static abstract bool TryParse (ReadOnlySpan<char> s, System.Globalization.NumberStyles style, IFormatProvider? provider, out TSelf result);
static member TryParse : ReadOnlySpan<char> * System.Globalization.NumberStyles * IFormatProvider * 'Self -> bool
Public Shared Function TryParse (s As ReadOnlySpan(Of Char), style As NumberStyles, provider As IFormatProvider, ByRef result As TSelf) As Boolean

Parametry

s
ReadOnlySpan<Char>

Zakres znaków do przeanalizowania.

style
NumberStyles

Bitowa kombinacja stylów liczbowych, które mogą być obecne w .s

provider
IFormatProvider

Obiekt, który udostępnia informacje o formatowaniu specyficznym dla kultury.s

result
TSelf

Po powrocie zawiera wynik pomyślnie przeanalizowanej s lub niezdefiniowanej wartości w przypadku błędu.

Zwraca

truejeśli s została pomyślnie przeanalizowana; w przeciwnym razie . false

Wyjątki

style nie jest obsługiwaną NumberStyles wartością.

Dotyczy