标签:gets ring encoding ext 字节 get blog c# pre
string转byte[]:
byte[] byteArray = System.Text.Encoding.Default.GetBytes ( str );
byte[]转string:
string str = System.Text.Encoding.Default.GetString ( byteArray );
string转ASCII byte[]:
byte[] byteArray = System.Text.Encoding.ASCII.GetBytes ( str );
ASCII byte[]转string:
string str = System.Text.Encoding.ASCII.GetString ( byteArray );
标签:gets ring encoding ext 字节 get blog c# pre
原文地址:http://www.cnblogs.com/spyplus/p/6291751.html