Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Fallback Method
Collapse the table of content
Expand the table of content

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
)
public boolean Fallback (
	byte[] bytesUnknown, 
	int index
)
public override function Fallback (
	bytesUnknown : byte[], 
	index : int
) : boolean
Not applicable.

Parameters

bytesUnknown

An input array of bytes.

index

The index position of a byte in the input.

Return Value

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.

Exception typeCondition

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 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2015 Microsoft