Export (0) Print
Expand All

DecoderExceptionFallbackBuffer.Fallback Method

Throws DecoderFallbackException when the input byte sequence cannot be decoded. The nominal return value is not used.

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

public override bool Fallback(
	byte[] bytesUnknown,
	int index
)

Parameters

bytesUnknown
Type: System.Byte[]

An input array of bytes.

index
Type: System.Int32

The index position of a byte in the input.

Return Value

Type: System.Boolean
None. No value is returned because the Fallback method always throws an exception.
The nominal return value is true. A return value is defined, although it is unchanging, because this method implements an abstract method.

ExceptionCondition
DecoderFallbackException

This method always throws an exception that reports the value and index position of the input byte that cannot be decoded.

The GetBytes and Convert methods call Fallback if they encounter an unknown byte in their input. In response, the Fallback method always throws DecoderFallbackException and displays the input data. The Fallback method nominally indicates whether an exception is thrown if an input byte sequence cannot be decoded.

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

Community Additions

ADD
Show:
© 2014 Microsoft