UIntPtr.TryParse 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, UIntPtr) |
嘗試將UTF-8字元的範圍剖析為值。 |
| TryParse(ReadOnlySpan<Char>, UIntPtr) |
將數位之字元表示的唯讀範圍轉換為其不帶正負號的原生整數對等。 傳回值表示轉換是否成功。 |
| TryParse(String, UIntPtr) |
將數位的字串表示轉換為其不帶正負號的原生整數對等專案。 傳回值表示轉換是否成功。 |
| TryParse(ReadOnlySpan<Byte>, IFormatProvider, UIntPtr) |
嘗試將UTF-8字元的範圍剖析為值。 |
| TryParse(ReadOnlySpan<Char>, IFormatProvider, UIntPtr) |
嘗試將字串剖析成值。 |
| TryParse(String, IFormatProvider, UIntPtr) |
嘗試將字串剖析成值。 |
| TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, UIntPtr) |
將指定樣式和特定文化特性格式之數位之字元的唯讀範圍轉換為其不帶正負號的原生整數對等專案。 傳回值表示轉換是否成功。 |
| TryParse(ReadOnlySpan<Byte>, UIntPtr) |
嘗試將包含數位字串表示的UTF-8字元範圍轉換為其不帶正負號的整數對等專案。 |
| TryParse(String, NumberStyles, IFormatProvider, UIntPtr) |
將指定樣式和特定文化特性格式之數位的字串表示轉換為其不帶正負號的原生整數對等。 傳回值表示轉換是否成功。 |
TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, UIntPtr)
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
嘗試將UTF-8字元的範圍剖析為值。
public:
static bool TryParse(ReadOnlySpan<System::Byte> utf8Text, System::Globalization::NumberStyles style, IFormatProvider ^ provider, [Runtime::InteropServices::Out] UIntPtr % result) = System::Numerics::INumberBase<UIntPtr>::TryParse;
public static bool TryParse(ReadOnlySpan<byte> utf8Text, System.Globalization.NumberStyles style, IFormatProvider? provider, out UIntPtr result);
static member TryParse : ReadOnlySpan<byte> * System.Globalization.NumberStyles * IFormatProvider * unativeint -> bool
Public Shared Function TryParse (utf8Text As ReadOnlySpan(Of Byte), style As NumberStyles, provider As IFormatProvider, ByRef result As UIntPtr) As Boolean
參數
- utf8Text
- ReadOnlySpan<Byte>
要剖析的UTF-8字元範圍。
- style
- NumberStyles
一個可以存在 utf8Text於 的數字樣式的位元組合。
- provider
- IFormatProvider
一個提供關於 utf8Text的文化特定格式資訊的物件。
- result
-
UIntPtr
unativeint
回傳時,包含成功解析 utf8Text 的結果,失敗時則為未定義的值。
傳回
true 若 utf8Text 成功解析;否則, false。
適用於
TryParse(ReadOnlySpan<Char>, UIntPtr)
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
將數位之字元表示的唯讀範圍轉換為其不帶正負號的原生整數對等。 傳回值表示轉換是否成功。
public:
static bool TryParse(ReadOnlySpan<char> s, [Runtime::InteropServices::Out] UIntPtr % result);
public static bool TryParse(ReadOnlySpan<char> s, out UIntPtr result);
static member TryParse : ReadOnlySpan<char> * unativeint -> bool
Public Shared Function TryParse (s As ReadOnlySpan(Of Char), ByRef result As UIntPtr) As Boolean
參數
- s
- ReadOnlySpan<Char>
一個只讀的字元區段,包含可轉換的數字。
- result
-
UIntPtr
unativeint
當此方法回傳時,包含無符號的本位整數值,若轉換成功,則等同於 中 s所含的數字;若轉換失敗則為零。 若 s 參數為空、格式不正確,或代表的 MinValue 數字大小於或大於 MaxValue,則轉換失敗。 這個參數會未初始化傳遞;將覆寫原本在結果中提供的任何值。
傳回
true若s成功轉換;否則,。 false
適用於
TryParse(String, UIntPtr)
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
將數位的字串表示轉換為其不帶正負號的原生整數對等專案。 傳回值表示轉換是否成功。
public:
static bool TryParse(System::String ^ s, [Runtime::InteropServices::Out] UIntPtr % result);
public static bool TryParse(string? s, out UIntPtr result);
static member TryParse : string * unativeint -> bool
Public Shared Function TryParse (s As String, ByRef result As UIntPtr) As Boolean
參數
- s
- String
字串,包含要轉換的數位。
- result
-
UIntPtr
unativeint
當此方法回傳時,包含無符號的本位整數值,若轉換成功,則等同於 中 s所含的數字;若轉換失敗則為零。 若 s 參數為 null 空、格式不正確,或代表小 MinValue 於或大於 MaxValue的數字,轉換即告失敗。 這個參數會未初始化傳遞;將覆寫原本在結果中提供的任何值。
傳回
true若s成功轉換;否則,。 false
適用於
TryParse(ReadOnlySpan<Byte>, IFormatProvider, UIntPtr)
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
嘗試將UTF-8字元的範圍剖析為值。
public:
static bool TryParse(ReadOnlySpan<System::Byte> utf8Text, IFormatProvider ^ provider, [Runtime::InteropServices::Out] UIntPtr % result) = IUtf8SpanParsable<UIntPtr>::TryParse;
public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out UIntPtr result);
static member TryParse : ReadOnlySpan<byte> * IFormatProvider * unativeint -> bool
Public Shared Function TryParse (utf8Text As ReadOnlySpan(Of Byte), provider As IFormatProvider, ByRef result As UIntPtr) As Boolean
參數
- utf8Text
- ReadOnlySpan<Byte>
要剖析的UTF-8字元範圍。
- provider
- IFormatProvider
一個提供關於 utf8Text的文化特定格式資訊的物件。
- result
-
UIntPtr
unativeint
回傳時,包含成功解析 utf8Text 的結果,失敗時則為未定義的值。
傳回
true 若 utf8Text 成功解析;否則, false。
適用於
TryParse(ReadOnlySpan<Char>, IFormatProvider, UIntPtr)
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
嘗試將字串剖析成值。
public:
static bool TryParse(ReadOnlySpan<char> s, IFormatProvider ^ provider, [Runtime::InteropServices::Out] UIntPtr % result) = ISpanParsable<UIntPtr>::TryParse;
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out UIntPtr result);
static member TryParse : ReadOnlySpan<char> * IFormatProvider * unativeint -> bool
Public Shared Function TryParse (s As ReadOnlySpan(Of Char), provider As IFormatProvider, ByRef result As UIntPtr) As Boolean
參數
- s
- ReadOnlySpan<Char>
一個只讀的字元區段,包含可轉換的數字。
- provider
- IFormatProvider
一個提供關於 s的文化特定格式資訊的物件。
- result
-
UIntPtr
unativeint
當此方法回傳時,包含成功解析 s 的結果,或失敗時為未定義的值。
傳回
true若s成功轉換;否則,。 false
適用於
TryParse(String, IFormatProvider, UIntPtr)
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
嘗試將字串剖析成值。
public:
static bool TryParse(System::String ^ s, IFormatProvider ^ provider, [Runtime::InteropServices::Out] UIntPtr % result) = IParsable<UIntPtr>::TryParse;
public static bool TryParse(string? s, IFormatProvider? provider, out UIntPtr result);
static member TryParse : string * IFormatProvider * unativeint -> bool
Public Shared Function TryParse (s As String, provider As IFormatProvider, ByRef result As UIntPtr) As Boolean
參數
- s
- String
要剖析的字串。
- provider
- IFormatProvider
一個提供關於 s的文化特定格式資訊的物件。
- result
-
UIntPtr
unativeint
當此方法回傳時,包含成功解析 s 的結果,或失敗時為未定義的值。
傳回
true 若 s 成功解析;否則, false。
適用於
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, UIntPtr)
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
將指定樣式和特定文化特性格式之數位之字元的唯讀範圍轉換為其不帶正負號的原生整數對等專案。 傳回值表示轉換是否成功。
public:
static bool TryParse(ReadOnlySpan<char> s, System::Globalization::NumberStyles style, IFormatProvider ^ provider, [Runtime::InteropServices::Out] UIntPtr % result) = System::Numerics::INumberBase<UIntPtr>::TryParse;
public:
static bool TryParse(ReadOnlySpan<char> s, System::Globalization::NumberStyles style, IFormatProvider ^ provider, [Runtime::InteropServices::Out] UIntPtr % result);
public static bool TryParse(ReadOnlySpan<char> s, System.Globalization.NumberStyles style, IFormatProvider? provider, out UIntPtr result);
static member TryParse : ReadOnlySpan<char> * System.Globalization.NumberStyles * IFormatProvider * unativeint -> bool
Public Shared Function TryParse (s As ReadOnlySpan(Of Char), style As NumberStyles, provider As IFormatProvider, ByRef result As UIntPtr) As Boolean
參數
- s
- ReadOnlySpan<Char>
一個只讀的字元區段,包含可轉換的數字。 張成是用 所 style指定的風格來解釋的。
- style
- NumberStyles
一個位元組合的列舉值,表示可能存在 s於 中的樣式元素。
- provider
- IFormatProvider
一個提供關於 s的文化特定格式資訊的物件。
- result
-
UIntPtr
unativeint
當此方法回傳時,包含無符號的本位整數值,若轉換成功,則等同於 中 s所含的數字;若轉換失敗則為零。 若 s 參數為空、格式不正確,或代表的 MinValue 數字大小於或大於 MaxValue,則轉換失敗。 這個參數會未初始化傳遞;將覆寫原本在結果中提供的任何值。
傳回
true若s成功轉換;否則,。 false
適用於
TryParse(ReadOnlySpan<Byte>, UIntPtr)
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
嘗試將包含數位字串表示的UTF-8字元範圍轉換為其不帶正負號的整數對等專案。
public:
static bool TryParse(ReadOnlySpan<System::Byte> utf8Text, [Runtime::InteropServices::Out] UIntPtr % result);
public static bool TryParse(ReadOnlySpan<byte> utf8Text, out UIntPtr result);
static member TryParse : ReadOnlySpan<byte> * unativeint -> bool
Public Shared Function TryParse (utf8Text As ReadOnlySpan(Of Byte), ByRef result As UIntPtr) As Boolean
參數
- utf8Text
- ReadOnlySpan<Byte>
範圍,包含代表要轉換之數位的UTF-8字元。
- result
-
UIntPtr
unativeint
當此方法回傳時,包含無號整數值,若轉換成功則等同於 的 utf8Text 數字;若轉換失敗則為零。 這個參數會未初始化傳遞;將覆寫原本在結果中提供的任何值。
傳回
true若utf8Text成功轉換;否則,。 false
適用於
TryParse(String, NumberStyles, IFormatProvider, UIntPtr)
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
- 來源:
- UIntPtr.cs
將指定樣式和特定文化特性格式之數位的字串表示轉換為其不帶正負號的原生整數對等。 傳回值表示轉換是否成功。
public:
static bool TryParse(System::String ^ s, System::Globalization::NumberStyles style, IFormatProvider ^ provider, [Runtime::InteropServices::Out] UIntPtr % result) = System::Numerics::INumberBase<UIntPtr>::TryParse;
public:
static bool TryParse(System::String ^ s, System::Globalization::NumberStyles style, IFormatProvider ^ provider, [Runtime::InteropServices::Out] UIntPtr % result);
public static bool TryParse(string? s, System.Globalization.NumberStyles style, IFormatProvider? provider, out UIntPtr result);
static member TryParse : string * System.Globalization.NumberStyles * IFormatProvider * unativeint -> bool
Public Shared Function TryParse (s As String, style As NumberStyles, provider As IFormatProvider, ByRef result As UIntPtr) As Boolean
參數
- s
- String
字串,包含要轉換的數位。 字串的解譯方式由 所指定的 style樣式。
- style
- NumberStyles
一個位元組合的列舉值,表示可能存在 s於 中的樣式元素。
- provider
- IFormatProvider
一個提供關於 s的文化特定格式資訊的物件。
- result
-
UIntPtr
unativeint
當此方法回傳時,包含無符號的本位整數值,若轉換成功,則等同於 中 s所含的數字;若轉換失敗則為零。 若 s 參數為 null 空、格式不正確,或代表小 MinValue 於或大於 MaxValue的數字,轉換即告失敗。 這個參數會未初始化傳遞;將覆寫原本在結果中提供的任何值。
傳回
true若s成功轉換;否則,。 false