Share via


FromBase64String Method

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

Converts the specified string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array.

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

Syntax

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

Parameters

Return Value

Type: array<System. . :: . .Byte> [] () [] []
An array of 8-bit unsigned integers that is equivalent to inString.

Exceptions

Exception Condition
ArgumentNullException

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

FormatException

The length of inString, ignoring white-space characters, is not zero or a multiple of 4.

-or-

The format of inString is invalid. inString contains a non-base-64 character, more than two padding characters, or a non-white space-character among the padding characters.

Remarks

inString is composed of base-64 digits, white-space characters, and trailing padding characters. The base-64 digits in ascending order from zero are the uppercase characters "A" to "Z", lowercase characters "a" to "z", numerals "0" to "9", and the symbols "+" and "/".

The white-space characters, and their Unicode names and hexadecimal code points, are tab (CHARACTER TABULATION, U+0009), newline (LINE FEED, U+000A), carriage return (CARRIAGE RETURN, U+000D), and blank (SPACE, U+0020). An arbitrary number of white-space characters can appear in inString because all white-space characters are ignored.

The valueless character, "=", is used for trailing padding. The end of inString can consist of zero, one, or two padding characters.

.NET Framework Security

See Also

Reference

Convert Class

System Namespace