Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[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
- 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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.