Export (0) Print
Expand All

EncoderFallbackBuffer.Fallback Method (Char, Char, Int32)

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 MustOverride Function Fallback ( _
	charUnknownHigh As Char, _
	charUnknownLow As Char, _
	index As Integer _
) As Boolean


Type: System.Char

The high surrogate of the input pair.

Type: System.Char

The low surrogate of the input pair.

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 the fallback buffer ignores the surrogate pair.

The Encoding.GetBytes and Encoder.Convert methods call Fallback(Char, Char, Int32) 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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

© 2014 Microsoft