Click or drag to resize
BitConverterToString Method (Byte, Int32)
Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal string representation.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static string ToString(
	byte[] value,
	int startIndex
)

Parameters

value
Type: SystemByte
An array of bytes.
startIndex
Type: SystemInt32
The starting position within value.

Return Value

Type: String
A string of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in a subarray of value; for example, "7F-2C-4A-00".
Exceptions
ExceptionCondition
ArgumentNullExceptionvalue is null.
ArgumentOutOfRangeExceptionstartIndex is less than zero or greater than the length of value minus 1.
See Also