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);
}
本文由 jashliaoeuwordpress 提供 原文連結