System.Text.DecoderFallback.CreateFallbackBuffer Method

When overridden in a derived class, initializes a new instance of the System.Text.DecoderFallbackBuffer class.

Syntax

public abstract DecoderFallbackBuffer CreateFallbackBuffer ()

Returns

An object that provides a fallback buffer for a decoder.

Remarks

This method returns an object derived from System.Text.DecoderFallbackBuffer that is responsible for performing the fallback operation. For example, of the predefined System.Text.DecoderFallback implementations in the .NET Framework, the DecoderReplacementFallback.CreateFallbackBuffer method returns a System.Text.DecoderReplacementFallbackBuffer object, and the DecoderExceptionFallback.CreateFallbackBuffer method returns a System.Text.DecoderExceptionFallbackBuffer object.

The DecoderFallback.CreateFallbackBuffer method is called by a decoder when it encounters the first byte that it is unable to decode. The System.Text.DecoderFallbackBuffer object returned by this method provides the fallback implementation and is responsible for returning the string that replaces the byte or bytes that could not be decoded.

Requirements

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