Click or drag to resize
ConvertToBase64String Method (Byte, Base64FormattingOptions)
Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. A parameter specifies whether to insert line breaks in the return value.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static string ToBase64String(
	byte[] inArray,
	Base64FormattingOptions options
)

Parameters

inArray
Type: SystemByte
An array of 8-bit unsigned integers.
options
Type: SystemBase64FormattingOptions
InsertLineBreaks to insert a line break every 76 characters, or None to not insert line breaks.

Return Value

Type: String
The string representation in base 64 of the elements in inArray.
Exceptions
ExceptionCondition
ArgumentNullExceptioninArray is null.
ArgumentExceptionoptions is not a valid Base64FormattingOptions value.
See Also