ToBase64String Method (Byte[])

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

static member ToBase64String : 
        inArray:byte[] -> string 

Parameters

inArray
Type: array<System..::..Byte>[]()[][]
An array of 8-bit unsigned integers.

Return Value

Type: System..::..String
The string representation, in base 64, of the contents of inArray.

ExceptionCondition
ArgumentNullException

inArray is nullNothingnullptrunita null reference (Nothing in Visual Basic).

The elements of inArray are taken as a numeric value and converted to a string representation that is encoded with base-64 digits.

The base-64 digits in ascending order from zero are the uppercase characters "A" to "Z", the lowercase characters "a" to "z", the numerals "0" to "9", and the symbols "+" and "/". The valueless character, "=", is used for trailing padding.

Important noteImportant

The ToBase64String method is designed to process a single byte array that contains all the data to be encoded. To encode data from a stream, use the ToBase64Transform class.

Show: