Editar

Compartir a través de


DecoderExceptionFallbackBuffer.Fallback(Byte[], Int32) Method

Definition

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