Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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.


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

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft