.net 流氓
天下无难事,有志者成之;天下无易事,有恒者得之。

1   string   to   byte  []
  string   str   =   "abcd"  ;   
  byte[]   bytes   =   System.Text.Encoding.ASCII.GetBytes(str);   
   -------------------------------------------------------------------------------------------------------------
 2   byte[]   to   string   
    
  byte[]   bytes   =   new   byte[255]   ;   
   string   str   =   System.Text.Encoding.ASCII.GetString(bytes,0,bytes.Length); 

posted on 2012-08-24 09:05  .net 流氓  阅读(347)  评论(0编辑  收藏  举报