winform C#中Byte与String的转换方法,相互转换

字节数组转字符

byte2string

            byte[] JieGuo = 字节数组
            string JieGuoZiFu = BitConverter.ToString(JieGuo);

字符串转字节数组

string2byte

             byte[] YaoSanLie = Encoding.ASCII.GetBytes(字符串);

原文地址:https://www.cnblogs.com/hfzsjz/p/1839396.html