I have a list array named “list”. I need to convert this list into a hex string. I tried the code below but it hasn’t worked.
var list = objIPLayer.Udp.Payload.ToList();
string hex = BitConverter.ToString(list);
I got this error:
The best overloaded method match for
'System.BitConverter.ToString(byte[])'has some invalid arguments**
when executed the following code.string hex = BitConverter.ToString(list);
Is there any method to do this?
BitConverter.ToString(byte[]) Expects
byte []notIEnumerable<byte>orList<byte>.Try following