看板 C_Sharp 關於我們 聯絡資訊
補上程式碼 class test1 { public int [] index; public test1() { index = new int[6]; Random r = new Random(unchecked((int)DateTime.Now.Ticks)); for (int i = 0; i < index.Length; i++) index[i] = r.Next(1000000000) % 2; //index[i] = r.Next(2); } } static void Main(string[] args) { test1 xxxxx = new test1(); test1 xxx = new test1(); test1 xxxx = new test1(); } } 我只要亂數取 0 OR 1 取出來index[]的RANDOM數 都一樣 大家幫幫忙吧 註解哪一行也一樣 -- 落地生根手創坊 http://www.wretch.cc/album/switch1001 手工精品~~~歡迎參觀指教!!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.25.101.28 ※ 編輯: reptile0426 來自: 163.25.101.28 (06/24 03:53)