Base64Encode(Byte, Base64FormattingOptions) Method

Converts a Byte array to a corresponding Base64-encoded string. You can determine, whether line breaks are to be inserted into the return value.

Definition

Namespace: FolkerKinzel.Strings
Assembly: FolkerKinzel.Strings (in FolkerKinzel.Strings.dll) Version: 9.4.0+10a7d4d71aa960998e32ac0ac6c4fcbe4164c917
C#
public static string Encode(
	byte[]? bytes,
	Base64FormattingOptions options = Base64FormattingOptions.None
)

Parameters

bytes  Byte
A Byte array that contains the data to encode, or null.
options  Base64FormattingOptions  (Optional)
One of the enumeration values, which specify whether or not line breaks are to be inserted into the return value. The default is None.

Return Value

String
The string representation of the elements in bytes as Base64.

Exceptions

ArgumentExceptionoptions is not a defined Base64FormattingOptions value.

See Also