可能是System.Text.Encoding.Default.GetBytes(aaa,0,aaa.Length,ccc,0)本身的问题,试试这样可以不
byte[] ccc=System.Text.Encoding.Default.GetBytes(aaa);
byte[] ddd=new byte[64];
System.Array.Copy(ccc,ddd,ccc.Length);
byte[] ccc=System.Text.Encoding.Default.GetBytes(aaa);
byte[] ddd=new byte[64];
System.Array.Copy(ccc,ddd,ccc.Length);
解决方案 »
- C# 终止代码运行 而不终止程序
- mvc3.0 razor模板开发 网站Demo
- 为什么在WPF中无法使用ConfigurationManager?
- listview 选中行 清空
- 设置SqlParameter.Direction属性问题
- 求System.Configuration命名空间下AppSettingsReader读写配置文件的方法~
- 这样用Session对吗?Session["UserName"]=this.UserName.Text;
- 小菜问个简单问题,希望大鸟们帮忙!!!
- 进度条
- 为什么打不开数据库?
- c# web开发使用ListBox,ListBox1.SelectedIndex=-1 的问题!
- 关于ListBox的DrawItem效果
可能是System.Text.Encoding.Default.GetBytes(aaa,0,aaa.Length,ccc,0)本身的问题,试试这样可以不
byte[] ccc=System.Text.Encoding.Default.GetBytes(aaa);
byte[] ddd=new byte[64];
System.Array.Copy(ccc,ddd,ccc.Length);
我试了还是一样不行。
byte[] bbb=new byte[64]{
63,176,120,72,209,156,244,36,92,156,32,208,45,68,68,232, 75,192,98,151,155,23,70,122,214,248,144,79,182,70,12,
237,63,176,120,72,209,156,244,36,92,156,32,208,45,68, 68,232,75,192,98,151,155,23,70,122,214,248,144,79,182,
70,12,237};aaa=System.Text.Encoding.Unicode.GetString(bbb,0,64);
byte[] ccc=new byte[64];
System.Text.Encoding.Unicode.GetBytes(aaa,0,aaa.Length,ccc,0);