10 lines
375 B
HTML
10 lines
375 B
HTML
|
|
|
|
<div id="sina_keyword_ad_area2" class="articalContent ">
|
|
<div>string str = "abc"</div>
|
|
<div>//字符串转成编码为GB2312的byte[]</div>
|
|
byte[] pData =System.Text.Encoding.GetEncoding("GB2312").GetBytes(str);
|
|
<div>//byte[]转字符串</div>
|
|
<div>str = Encoding.Default.GetString(<span style="line-height:21px">pData</span>);</div>
|
|
</div>
|
|
|