DecoderExceptionFallbackBuffer.Fallback(Byte[], Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Throws DecoderFallbackException when the input byte sequence cannot be decoded. The nominal return value is not used.
public:
override bool Fallback(cli::array <System::Byte> ^ bytesUnknown, int index);
public override bool Fallback (byte[] bytesUnknown, int index);
override this.Fallback : byte[] * int -> bool
Public Overrides Function Fallback (bytesUnknown As Byte(), index As Integer) As Boolean
Parameters
- bytesUnknown
- Byte[]
An input array of bytes.
- index
- Int32
The index position of a byte in the input.
Returns
None. No value is returned because the Fallback(Byte[], Int32) method always throws an exception.
The nominal return value is true
. A return value is defined, although it is unchanging, because this method implements an abstract method.
Exceptions
This method always throws an exception that reports the value and index position of the input byte that cannot be decoded.
Remarks
The GetBytes and Convert methods call Fallback if they encounter an unknown byte in their input. In response, the Fallback method always throws DecoderFallbackException and displays the input data. The Fallback method nominally indicates whether an exception is thrown if an input byte sequence cannot be decoded.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應