I am trying to convert an array of bytes to hexadecimal string, so I see a lot of examples to generate this code
the following code have this error :
Error CS1503 Argument 2: cannot convert from 'int' to 'System.Globalization.NumberStyles' SecurityLibrary
any help?
public string bytesToString(byte[,]array ,int row ,int column)
{
string result = "";
for(int i=0; i< row; i++)
{
byte[] arr = new byte[4];
for(int j=0; j<column;j++)
{
arr[j] = array[i,j];
}
string num = Convert.ToString(long.Parse(arr.ToString() ,16) );
result += num.ToString();
}
return result;
}
https://stackoverflow.com/questions/311165/how-do-you-convert-a-byte-array-to-a-hexadecimal-string-and-vice-versa – Alaaeddine HFIDHI Apr 05 '19 at 15:46