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)

Source:
Complex.cs
Source:
Complex.cs
Source:
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)

Source:
Complex.cs
Source:
Complex.cs
Source:
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)

Source:
Complex.cs
Source:
Complex.cs
Source:
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)

Source:
Complex.cs
Source:
Complex.cs
Source:
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

适用于