ByteArrayExtensions.

ToByteArray(string, Encoding) Method

Summary

Converts a string to a byte array using a specific encoding.
Assembly
Cake.Issues.dll
Namespace
Cake.Issues
Containing Type
ByteArrayExtensions

Syntax

public static byte[] ToByteArray(this string value, Encoding encoding)

Parameters

Name Type Description
value string String value to convert.
encoding Encoding Encoding to use.

Return Value

Type Description
byte[] Byte array with string value in specified encoding.
GitHub