ToEncodedString Method
Definition
- Namespace
- Cuemon.Extensions.IO
- Assemblies
- Cuemon.Extensions.IO.dll
ToEncodedString(Stream, Action<StreamEncodingOptions>)
Converts the specified value to a string.
public static string ToEncodedString(this Stream value, Action<StreamEncodingOptions> setup = null)
Parameters
valueStreamThe Stream to extend.
setupAction<StreamEncodingOptions>The StreamReaderOptions which may be configured.
Returns
Remarks
IEncodingOptions will be initialized with DefaultPreambleSequence and DefaultEncoding.
Exceptions
- ArgumentNullException
valuecannot be null.- InvalidEnumArgumentException
setupwas initialized with an invalid Preamble.