This documentation is archived and is not being maintained.

EncoderFallbackBuffer.Fallback Method (Char, Char, Int32)

Updated: October 2010

When overridden in a derived class, prepares the fallback buffer to handle the specified surrogate pair.

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

public abstract bool Fallback(
	char charUnknownHigh,
	char charUnknownLow,
	int index
)

Parameters

charUnknownHigh
Type: System.Char

The high surrogate of the input pair.

charUnknownLow
Type: System.Char

The low surrogate of the input pair.

index
Type: System.Int32

The index position of the surrogate pair in the input buffer.

Return Value

Type: System.Boolean
True if the fallback buffer can process charUnknownHigh and charUnknownLow; false if fallback buffer ignores the surrogate pair.

The Encoding.GetBytes and Encoder.Convert methods call Fallback if they encounter a surrogate pair in their input. A return value of true indicates that the fallback buffer can process the surrogate pair, which causes the calling method to call the GetNextChar method to obtain each character of the fallback buffer. Because it does not process individual characters, the Fallback method in an exception fallback handler throws an exception.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Date

History

Reason

October 2010

Revised the Remarks section.

Information enhancement.

Show: