EncoderFallbackBuffer::Fallback Method (Char, Char, Int32)
When overridden in a derived class, prepares the fallback buffer to handle the specified surrogate pair.
Assembly: mscorlib (in mscorlib.dll)
public: virtual bool Fallback( wchar_t charUnknownHigh, wchar_t charUnknownLow, int index ) abstract
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::Booleantrue 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.
Available since 10
.NET Framework
Available since 2.0