EncoderExceptionFallbackBuffer.Fallback Method (Char, Int32)


Throws an exception because the input character cannot be encoded. Parameters specify the value and index position of the character that cannot be converted.

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

public override bool Fallback(
	char charUnknown,
	int index


Type: System.Char

An input character.

Type: System.Int32

The index position of the character in the input buffer.

Return Value

Type: System.Boolean

None. No value is returned because the Fallback method always throws an exception.

Exception Condition

charUnknown cannot be encoded. This method always throws an exception that reports the value of the charUnknown and index parameters.

The GetBytes and Convert methods call Fallback if they encounter an unknown character in their input. In response, Fallback always throws EncoderFallbackException.

.NET Framework
Available since 2.0
Return to top