共用方式為


Complex.TryParse 方法

定義

多載

TryParse(String, NumberStyles, IFormatProvider, Complex)

嘗試將字串剖析成值。

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

嘗試將字元範圍剖析成值。

TryParse(String, IFormatProvider, Complex)

嘗試將字串剖析成值。

TryParse(ReadOnlySpan<Char>, IFormatProvider, Complex)

嘗試將字元範圍剖析成值。

TryParse(String, NumberStyles, IFormatProvider, Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

嘗試將字串剖析成值。

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

參數

s
String

要剖析的字串。

style
NumberStyles

數字樣式的位元組合,可以存在於 中 s

provider
IFormatProvider

提供關於 s 之特定文化特性格式資訊的物件。

result
Complex

傳回時,包含失敗時可成功剖析 s 或未定義值的結果。

傳回

true 如果 s 已成功剖析,則為 ,否則為 false

適用於

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

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

嘗試將字元範圍剖析成值。

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

參數

s
ReadOnlySpan<Char>

要剖析的字元範圍。

style
NumberStyles

數字樣式的位元組合,可以存在於 中 s

provider
IFormatProvider

提供關於 s 之特定文化特性格式資訊的物件。

result
Complex

傳回時,包含失敗時可成功剖析 s 或未定義值的結果。

傳回

true 如果 s 已成功剖析,則為 ,否則為 false

適用於

TryParse(String, IFormatProvider, Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

嘗試將字串剖析成值。

public:
 static bool TryParse(System::String ^ s, IFormatProvider ^ provider, [Runtime::InteropServices::Out] System::Numerics::Complex % result) = IParsable<System::Numerics::Complex>::TryParse;
public static bool TryParse (string? s, IFormatProvider? provider, out System.Numerics.Complex result);
static member TryParse : string * IFormatProvider * Complex -> bool
Public Shared Function TryParse (s As String, provider As IFormatProvider, ByRef result As Complex) As Boolean

參數

s
String

要剖析的字串。

provider
IFormatProvider

提供關於 s 之特定文化特性格式資訊的物件。

result
Complex

當這個方法傳回時,包含成功剖析 s 或失敗時未定義值的結果。

傳回

true 如果 s 已成功剖析,則為 ,否則為 false

適用於

TryParse(ReadOnlySpan<Char>, IFormatProvider, Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

嘗試將字元範圍剖析成值。

public:
 static bool TryParse(ReadOnlySpan<char> s, IFormatProvider ^ provider, [Runtime::InteropServices::Out] System::Numerics::Complex % result) = ISpanParsable<System::Numerics::Complex>::TryParse;
public static bool TryParse (ReadOnlySpan<char> s, IFormatProvider? provider, out System.Numerics.Complex result);
static member TryParse : ReadOnlySpan<char> * IFormatProvider * Complex -> bool
Public Shared Function TryParse (s As ReadOnlySpan(Of Char), provider As IFormatProvider, ByRef result As Complex) As Boolean

參數

s
ReadOnlySpan<Char>

要剖析的字元範圍。

provider
IFormatProvider

提供關於 s 之特定文化特性格式資訊的物件。

result
Complex

當這個方法傳回時,會包含成功剖析 s的結果,或失敗時未定義的值。

傳回

true 如果 s 已成功剖析,則為 ,否則為 false

適用於