Converts a specified number of elements of an array of unsigned bytes into a string, starting at a specified location.
[Visual Basic] Overloads Public Shared Function ToString( _ ByVal value() As Byte, _ ByVal startIndex As Integer, _ ByVal length As Integer _ ) As String [C#] public static string ToString( byte[] value, int startIndex, int length ); [C++] public: static String* ToString( unsigned char* value[], int startIndex, int length ); [JScript] public static function ToString( value : Byte[], startIndex : int, length : int ) : String;
A list of hexadecimal pairs representing the corresponding entries in value beginning at startIndex and ending at startIndex + length - 1. The hexadecimal pairs are separated by hyphens (for example, "7F-2C-4A").
Exception Type | Condition |
---|---|
ArgumentException | value is a null reference (in Visual Basic Nothing). |
ArgumentException | startIndex is less than zero or greater than the length of value. |
ArgumentException | Either length is less than zero, or startIndex + length is greater than the length of value |
BitConverter Class | BitConverter Members | System Namespace | BitConverter.ToString Overload List