DecoderReplacementFallbackBuffer.Fallback Method (Byte[], Int32)


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

Namespace:   System.Text
Assembly:  mscorlib (in mscorlib.dll)

public override bool Fallback(
	byte[] bytesUnknown,
	int index


Type: System.Byte[]

An input byte sequence. This parameter is ignored unless an exception is thrown.

Type: System.Int32

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

Return Value

Type: System.Boolean

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

Exception Condition

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

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.

.NET Framework
Available since 2.0
Return to top