[導入]C# 中字符和字節相互轉換
將字符轉換為字節:byte[] byteTime = Encoding.ASCII.GetBytes(DateTime.Now.ToString());
將字節轉換為字符:
string sTime = Encoding.ASCII.GetString(bytes,0,bytesRead);
文章來源:http://my.donews.com/robinchow/2007/03/25/c-%e4%b8%ad%e5%ad%97%e7%ac%a6%e5%92%8c%e5%ad%97%e8%8a%82%e7%9b%b8%e4%ba%92%e8%bd%ac%e6%8d%a2/
posted on 2007-10-23 20:45 Robin Chow 閱讀(114) 評論(0) 編輯 收藏 引用

