public void InsRandDate_cus(int count) // int count 갯수만큼 정보가 나옴.
 {
     for (int i = 0; i < count; i++)
     {
         listCust.Add(new Customer(rand.getName(), rand.getAge(), rand.getTel(), rand.getAddr(), rand.getGender()));
     }
 }
示例#2
0
 public void insRandData(int count)
 {
     for (int i = 0; i < count; i++)
     {
         listCust.Add(new Customer(
                          rand.getName(),
                          rand.getAge(),
                          rand.getTel(),
                          rand.getAddr(),
                          rand.getGender()));
     }
 }
        static void Main(string[] args)
        {
            RandData rand = new RandData();

            Student[] st = new Student[10];
            for (int i = 0; i < st.Length; i++)
            {
                st[i] = new Student(rand.getName(), rand.getAge(),
                                    rand.getGender(), rand.getAddress());
                Console.WriteLine(st[i].ToString());
            }

            for (int i = 0; i < st.Length; i++)
            {
                st[9] = new Student("전우치", 24, '남', "조선 한양인근 두메산골");
                Console.WriteLine(st[i].ToString());
            }
        }