Method ToString
ToString(Byte[], String)
Returns a string that represents each
Byte in the array with the corresponding format.
Optimised for use with the formats "x2" and "X2" to yield a hexadecimal representation of the byte
array, using lowercase or uppercase hexadecimal characters, respectively.
Declaration
public static string ToString(this byte[] bytes, string format)
Parameters
Type |
Name |
Description |
Byte[] |
bytes |
This Byte array to return a string representation for. |
String |
format |
Format specification for each Byte. |
Returns
Type |
Description |
String |
A string representation of the Byte array using the specified format for each byte.
|
ToString(Byte[], String, String)
Returns a string that represents each
Byte in the array with the corresponding format.
Optimised for use with the formats "x2" and "X2" to yield a hexadecimal representation of the byte
array, using lowercase or uppercase hexadecimal characters, respectively.
Declaration
public static string ToString(this byte[] bytes, string format, string delimiter)
Parameters
Type |
Name |
Description |
Byte[] |
bytes |
This Byte array to return a string representation for. |
String |
format |
Format specification for each Byte. |
String |
delimiter |
The delimiter String inserted between each byte. If null , the delimiter is
treated equally to an empty string.
|
Returns
Type |
Description |
String |
A string representation of the Byte array using the specified format for each byte,
delimited by the provided delimiter string.
|