随笔分类 -  C#

摘要:三种平台生成随机数,以及生成指定范围内的随机数。 C#写法 //生成随机数范围1-6 int num001 = new Random().Next(1, 7); Console.WriteLine("生成随机 num001 is . {0}", num001); //生成随机数范围36.0~37.0 阅读全文
posted @ 2020-02-07 10:46 snbill 阅读(173) 评论(0) 推荐(0)
摘要:C# Byte[] string转换 01,C# string类型转成byte[]: Byte[] byteArray = System.Text.Encoding.Default.GetBytes ( str ); 02, C# byte[]转成string: stringstr = System 阅读全文
posted @ 2020-02-06 14:48 snbill 阅读(28703) 评论(0) 推荐(2)