System.Text.DecoderReplacementFallback Class

Provides a failure-handling mechanism, called a fallback, for an encoded input byte sequence that cannot be converted to an output character. The fallback emits a user-specified replacement string instead of a decoded input byte sequence. This class cannot be inherited.

See Also: DecoderReplacementFallback Members

Syntax

public sealed class DecoderReplacementFallback : DecoderFallback

Remarks

A common reason for an encoding or decoding operation to fail is if the underlying encoding class does not provide a mapping between a character and an equivalent byte sequence. If an input byte sequence cannot be converted to an output character, a System.Text.DecoderReplacementFallback object emits a replacement string into the output to represent the original input byte sequence. The conversion process then continues to decode the remainder of the original input.

The value of a System.Text.DecoderReplacementFallback object is the replacement string used to initialize that object.

Requirements

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0