Επεξεργασία

Κοινή χρήση μέσω


DecoderReplacementFallbackBuffer.Fallback(Byte[], Int32) Method

Definition

Prepares the replacement fallback buffer to use the current replacement string.

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 byte sequence. This parameter is ignored unless an exception is thrown.

index
Int32

The index position of the byte in bytesUnknown. This parameter is ignored in this operation.

Returns

true if the replacement string is not empty; false if the replacement string is empty.

Exceptions

This method is called again before the GetNextChar() method has read all the characters in the replacement fallback buffer.

Remarks

The GetBytes and Convert methods call Fallback if they encounter an unknown input byte sequence that cannot be decoded. If the return value of Fallback is true, the calling method can invoke the GetNextChar method to obtain each character of the fallback buffer.

Applies to