Beispiel #1
0
        public void AddTelephone()
        {
            string    code   = Console.ReadLine();
            string    num    = Console.ReadLine();
            string    strana = Console.ReadLine();
            Telephone A      = new Telephone(num, code, strana);

            telephones.Add(A);
        }
Beispiel #2
0
        public void Sort()
        {
            Telephone temptelephone = new Telephone();

            for (int i = 0; i < telephones.Count; i++)
            {
                for (int j = 0; j < telephones.Count - i - 1; j++)
                {
                    if (string.Compare(telephones[j].ToString(), telephones[j + 1].ToString()) > 0)
                    {
                        temptelephone     = telephones[j];
                        telephones[j]     = telephones[j + 1];
                        telephones[j + 1] = temptelephone;
                    }
                }
            }
        }
Beispiel #3
0
        public void Sort()
        {
            Email     tempmail      = new Email();
            Telephone temptelephone = new Telephone();

            for (int i = 0; i < emails.Count; i++)
            {
                for (int j = 0; j < emails.Count - i - 1; j++)
                {
                    if (string.Compare(emails[j].ToString(), emails[j + 1].ToString()) > 0)
                    {
                        tempmail      = emails[j];
                        emails[j]     = emails[j + 1];
                        emails[j + 1] = tempmail;
                    }
                }
            }
        }