Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Convert.ToBase64String Method (Byte[], Int32, Int32)

Converts a subset of an array of 8-bit unsigned integers to its equivalent String representation encoded with base 64 digits. Parameters specify the subset as an offset in the input array, and the number of elements in the array to convert.

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

public static string ToBase64String (
	byte[] inArray,
	int offset,
	int length
)
public static String ToBase64String (
	byte[] inArray, 
	int offset, 
	int length
)
public static function ToBase64String (
	inArray : byte[], 
	offset : int, 
	length : int
) : String
Not applicable.

Parameters

inArray

An array of 8-bit unsigned integers.

offset

An offset in inArray.

length

The number of elements of inArray to convert.

Return Value

The String representation in base 64 of length elements of inArray starting at position offset.
Exception typeCondition

ArgumentNullException

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

ArgumentOutOfRangeException

offset or length is negative.

-or-

offset plus length is greater than the length of inArray.

The elements of inArray are taken as a numeric value and converted to a String representation in base 64.

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.

The offset and length parameters are 32-bit signed numbers. The offset parameter is zero-based.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

XNA Framework

Supported in: 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.