Table of Contents

Class ByteArrayExtensions

Namespace
Cuemon.Extensions.IO
Assembly
Cuemon.Extensions.IO.dll

Extension methods for the byte[].

public static class ByteArrayExtensions
Inheritance
Object
ByteArrayExtensions

Methods

ToStream(Byte[])

Converts the specified bytes to its equivalent System.IO.Stream representation.

public static Stream ToStream(this byte[] bytes)

Parameters

bytes Byte[]

The byte[] to extend.

Returns

Stream

A System.IO.Stream that is equivalent to bytes.

Exceptions

System.ArgumentNullException

bytes cannot be null.

ToStreamAsync(Byte[])

Converts the the specified bytes to its equivalent System.IO.Stream representation.

public static Task<Stream> ToStreamAsync(this byte[] bytes)

Parameters

bytes Byte[]

The byte[] to extend.

Returns

Task<Stream>

A task that represents the asynchronous operation. The task result contains a System.IO.Stream that is equivalent to bytes.

Exceptions

System.ArgumentNullException

bytes cannot be null.