System.Text.EncoderReplacementFallbackBuffer.Fallback Method

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

Syntax

public override bool Fallback (char charUnknown, int index)

Parameters

charUnknown
An input character. This parameter is ignored in this operation unless an exception is thrown.
index
The index position of the character in the input buffer. This parameter is ignored in this operation.

Returns

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

Remarks

The erload:System.Text.Encoding.GetBytes and erload:System.Text.Encoder.Convert methods call EncoderReplacementFallbackBuffer.Fallback(char, int) if they encounter an unknown character in their input. If the return value of EncoderReplacementFallbackBuffer.Fallback(char, int) is true, the calling method can invoke the EncoderReplacementFallbackBuffer.GetNextChar method to obtain each character in the replacement fallback buffer.

Requirements

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0