예제 #1
0
        static void Main(string[] args)
        {
            Persons   i        = new Persons("a", "12", "同学");
            Addperson myperson = new Addperson(i);

            myperson.Add(new Persons("aa", "123", "朋友"));
            myperson.Add(new Persons("aaa", "1234", "家人"));
            myperson.Add(new Persons("aaaa", "12345", "其他"));
            myperson.RemoveAt(1);
            myperson.Show();
            Console.WriteLine(myperson.FindName("a"));
            Console.WriteLine(myperson.FindAllMobileNumber("123"));
            myperson.Exists("aa");
            myperson[2].Name = "aaaaaa";
            myperson.Show();
        }
예제 #2
0
 public Addperson(Addperson other)
 {
     myperson = new List <Persons>();
 }