Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EncoderFallbackBuffer::Fallback Method (Char, Int32)

 

When overridden in a derived class, prepares the fallback buffer to handle the specified input character.

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

public:
virtual bool Fallback(
	wchar_t charUnknown,
	int index
) abstract

Parameters

charUnknown
Type: System::Char

An input character.

index
Type: System::Int32

The index position of the character in the input buffer.

Return Value

Type: System::Boolean

true if the fallback buffer can process charUnknown; false if the fallback buffer ignores charUnknown.

The Encoding::GetBytes and Encoder::Convert methods call Fallback(array<Byte>^, Int32) if they encounter an unknown input character that cannot be encoded. A return value of true indicates that the fallback buffer can process the input character, 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.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft