Export (0) Print
Expand All

DecoderReplacementFallbackBuffer.Fallback Method

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
)

Parameters

bytesUnknown
Type: System.Byte[]

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

index
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.

ExceptionCondition
ArgumentException

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft