Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, prepares the fallback buffer to handle the specified input byte sequence.
public:
abstract bool Fallback(cli::array <System::Byte> ^ bytesUnknown, int index);
public abstract bool Fallback(byte[] bytesUnknown, int index);
abstract member Fallback : byte[] * int -> bool
Public MustOverride Function Fallback (bytesUnknown As Byte(), index As Integer) As Boolean
An input array of bytes.
The index position of a byte in bytesUnknown
.
true
if the fallback buffer can process bytesUnknown
; false
if the fallback buffer ignores bytesUnknown
.
The Encoding.GetChars, Encoding.GetString, and Decoder.Convert methods call Fallback if they encounter an unknown input byte sequence that cannot be decoded. A return value of true
indicates that the fallback buffer can process the input byte sequence, which causes the calling method to call the GetNextChar method to obtain each character of the fallback buffer. If called in an exception fallback handler, the Fallback method throws an exception because it does not process individual bytes.
You can choose to ignore the index
parameter if you don't expect any previous fallback to be remaining in the buffer. Otherwise, index
is the index position in the bytesUnknown
array.
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in