Share via


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)

Syntax

'Declaration
Public Shared Function ToBase64String ( _
    inArray As Byte() _
) As String
public static string ToBase64String(
    byte[] inArray
)
public:
static String^ ToBase64String(
    array<unsigned char>^ inArray
)
static member ToBase64String : 
        inArray:byte[] -> string 
public static function ToBase64String(
    inArray : byte[]
) : String

Parameters

Return Value

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

Exceptions

Exception Condition
ArgumentNullException

inArray is null Nothing nullptr unit a null reference (Nothing in Visual Basic) .

Remarks

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

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.

.NET Framework Security

See Also

Reference

Convert Class

ToBase64String Overload

System Namespace