I need to check for a string located inside a packet that I receive as byte array. If I use BitConverter.ToString(), I get the bytes a
string
byte
BitConverter.ToString()
string hexString = "8E2"; int num = Int32.Parse(hexString, System.Globalization.NumberStyles.HexNumber); Console.WriteLine(num); //Output: 2274
From https://msdn.microsoft.com/en-us/library/bb311038.aspx