سلام
تابع :
public static byte[] FromHex(string hex)
{
hex = hex.Replace("-", "");
byte[] raw = new byte[hex.Length / 2];
for (int i = 0; i < raw.Length; i++)
{
raw[i] = Convert.ToByte(hex.Substring(i * 2, 2), 16);
}
return raw;
}
کد دکمه:
byte[] data = FromHex("4d-61-68-64-69");
string s = Encoding.ASCII.GetString(data);
textBox1.Text = s;
موفق باشید