C# 產生4個0~15的亂數整數,並將4個亂數轉換成一組字串 C# 產生4個0~15的亂數整數,並將4個亂數轉換成一組字串 2015-10-19 jashliao Comments 0 Comment C# 產生4個0~15的亂數整數,並將4個亂數轉換成一組字串 Random R = new Random();//亂A數A種O子l this.txt_InterfereCode.Text=“”; for (int i = 0; i < 4; i++) { int j = R.Next(0, 16);//0~15 this.txt_InterfereCode.Text += Convert.ToString(j, 16); }