摘要: 今天在网上查了下如何生成随机汉字字符串的方法,现在一起分享供大家学习和参考。public string aa() { Encoding gb = Encoding.GetEncoding("gb2312"); //调用函数产生4个随机中文汉字编码 object[] bytes = CreateRegionCode(4); //根据汉字编码的字节数组解码出中文汉字 string str1 = gb.GetString((byte[])Convert.ChangeType(bytes[0], typeof(byte[]))); string str2 = gb.GetStrin 阅读全文
posted @ 2012-01-11 14:35 .NET技术 阅读(427) 评论(0) 推荐(0) 编辑
网站:化妆品批发排行榜http://www.cosmetic-top.com/