ToByteArray Method
Definition
- Namespace
- Cuemon.Extensions.IO
- Assemblies
- Cuemon.Extensions.IO.dll
ToByteArray(Stream, Action<StreamCopyOptions>)
Converts the specified input to its equivalent byte array representation.
public static byte[] ToByteArray(this Stream input, Action<StreamCopyOptions> setup = null)
Parameters
inputStreamThe Stream to extend.
setupAction<StreamCopyOptions>The StreamCopyOptions which may be configured.
Returns
Exceptions
- ArgumentNullException
inputcannot be null.- ArgumentException
inputcannot be read from.