Table of Contents

ToStream Method

Definition

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

ToStream(string, Action<EncodingOptions>)

Converts the specified value to a Stream.

public static Stream ToStream(this string value, Action<EncodingOptions> setup = null)

Parameters

value string

The string to extend.

setup Action<EncodingOptions>

The EncodingOptions which may be configured.

Returns

Stream

A Stream containing the result of the specified value.

Remarks

Exceptions

ArgumentNullException

value cannot be null.

InvalidEnumArgumentException

setup was initialized with an invalid Preamble.