asp.net.ph

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

System Namespace   Convert Class


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

[ VB ]
Overloads Public Shared Function ToBase64String ( _
   ByVal inArray( ) As Byte, _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As String

[ C# ]
public static string ToBase64String (
   byte[ ] inArray,
   int offset,
   int length
);

[ C++ ]
public: static String* ToBase64String (
   unsigned char inArray __gc [ ],
   int offset,
   int length
);

[ JScript ]
public static function ToBase64String (
   inArray : Byte[ ],
   offset : int,
   length : int
) : String;

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.

Exceptions


Exception Type Condition
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.


Remarks

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', lowercase characters 'a' to 'z', numerals '0' to '9', and the symbols '+' and '/'. The valueless character, '=', is used for trailing padding.

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

See Also

Convert Members   Convert.ToBase64String Overload List   Byte Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph