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)

public static byte[] FromBase64String(
	string inString
)

Parameters

inString
Type: System..::..String
The string to convert.

Return Value

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

ExceptionCondition
ArgumentNullException

inString is nullNothingnullptrunita 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.

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.

Show: