ToString Method
Definition
ToString(byte[], Action<EncodingOptions>)
Converts the specified byte array to its string representation.
public static string ToString(byte[] input, Action<EncodingOptions> setup = null)
Parameters
inputbyte[]The byte array to convert.
setupAction<EncodingOptions>The delegate that configures the encoding behavior.
Returns
- string
A string that represents
input.
Remarks
EncodingOptions is initialized with DefaultPreambleSequence and DefaultEncoding. If the configured encoding is the default encoding, the encoding is detected from the byte order mark when possible.
Exceptions
- ArgumentNullException
inputis null.- InvalidEnumArgumentException
setupconfigures an invalid value for Preamble.