Table of Contents

ToCharArray Method

Definition

Namespace
Cuemon.Extensions.IO
Assemblies
Cuemon.Extensions.IO.dll
Source
src/Cuemon.Extensions.IO/StreamExtensions.cs

ToCharArray(Stream, Action<EncodingOptions>)

Converts the specified input to its equivalent char array representation.

public static char[] ToCharArray(this Stream input, Action<EncodingOptions> setup = null)

Parameters

input Stream

The Stream to be extended.

setup Action<EncodingOptions>

The EncodingOptions which may be configured.

Returns

char[]

A char array that is equivalent to input.

Remarks

Exceptions

ArgumentNullException

input cannot be null.

ArgumentException

input cannot be read from.

ArgumentOutOfRangeException

input length is greater than MaxValue.

InvalidEnumArgumentException

setup was initialized with an invalid Preamble.