Пример #1
0
 public static void Main()
 {
     Person firstPerson = new Person("Pesho", 22, "*****@*****.**");
     Person secondPerson = new Person("Gosho", 20);
     Console.WriteLine(firstPerson);
     Console.WriteLine(secondPerson);
 }
Пример #2
0
 static void Main(string[] args)
 {
     Person d = new Person("P", 20);
     Console.WriteLine(d);
     Person x = new Person("X", 100, "*****@*****.**");
     Console.WriteLine(x);
 }
Пример #3
0
 static void Main(string[] args)
 {
     Person peshko = new Person("Peshko", 20);
     Person goshko=new Person("Goshko",22,"*****@*****.**");
     Console.WriteLine(peshko);
     Console.WriteLine(goshko);
 }
Пример #4
0
 static void Main(string[] args)
 {
     Person person1 = new Person("Alexander", 20, "*****@*****.**");
     Person person2 = new Person("Kobe Bryant", 36);
     Console.WriteLine(person1);
     Console.WriteLine(person2);
 }
Пример #5
0
        static void Main()
        {
            Person ivo  = new Person("Ivaylo", 32, "*****@*****.**");
            Person mira = new Person("Miroslava", 30);

            Console.WriteLine(ivo);
            Console.WriteLine(mira);
        }
Пример #6
0
        public static void Main(string[] args)
        {
            Person personWithAge = new Person("Unufri", 12);
            Person personWithoutAge = new Person("Ani");

            Console.WriteLine(personWithAge.ToString());
            Console.WriteLine(personWithoutAge.ToString());
        }
Пример #7
0
        static void Main(string[] args)
        {
            Person zhivko = new Person("Zhivko", 99, "*****@*****.**");
            Person ivan = new Person("Ivan", 11);

            Console.WriteLine(zhivko.ToString());
            Console.WriteLine(ivan.ToString());
        }
Пример #8
0
        static void Main(string[] args)
        {
           Person george = new Person("George", 35);
           Person pesho = new Person("Pesho", 25, "@");
           Person alex = new Person("Alex", 25, "$");
           Person ani = new Person("Ani", 20, "*****@*****.**");

           Console.WriteLine("{0} {1} {2} {3}", george, pesho,alex, ani);
        }
Пример #9
0
 static void Main(string[] args)
 {
     Person firtPerson = new Person("Zeus", 30, "*****@*****.**");
     Console.WriteLine(firtPerson);
     Person secondPerson = new Person("Hera", 36);
     Console.WriteLine(secondPerson);
     Person ceco = new Person("Ceco");
     Console.WriteLine(ceco);
 }
Пример #10
0
 static void Main()
 {
     Person peter = new Person("Peter", 32, "*****@*****.**"); //създаден обект peter от тип Person
     Console.WriteLine(peter); //за да се отпечата, първо се ползва ToString
     Person mario = new Person("Mario", 10);
     Console.WriteLine(mario);
     Person marina = new Person("", -2, "");
     Console.WriteLine(marina);
 }
Пример #11
0
		public static void Main()
		{
		Person az = new Person("Pavel", 33, "*****@*****.**");
		Person ti = new Person("Natali", 28);
		
		Console.WriteLine(az);
		Console.WriteLine(ti);
		
		}
Пример #12
0
        static void Main(string[] args)
        {
            Person itsame = new Person("Mario", 30, "*****@*****.**");
            Person commanderSheperd = new Person("Jane Shepard", 32);
            //Person exceptionThrower = new Person("lol", 99, "lol");

            Console.WriteLine(itsame);
            Console.WriteLine(commanderSheperd);
        }
Пример #13
0
        static void Main()
        {
            Person pesho = new Person("pesho", 22);
            Console.WriteLine(pesho);

            Console.WriteLine("-------------------");

            Person misho = new Person("misho", 50, "*****@*****.**");
            Console.WriteLine(misho);
        }
Пример #14
0
        static void Main()
        {
            Person person1 = new Person("Nashmat", 18, "*****@*****.**");
            Console.WriteLine(person1.ToString());

            Person person2 = new Person("Onufrey", 21);
            Console.WriteLine(person2.ToString());

            //Person person3 = new Person("Mircho", 101);
            //Console.WriteLine(person3.ToString());
        }
Пример #15
0
        static void Main()
        {
            Person george = new Person("George", 25, "*****@*****.**");
            Person henry = new Person("Henry", 30, "@");
            Person michael = new Person("Michael", 35);

            Person[] persons = new Person[] { george, henry, michael };
            foreach (Person person in persons)
            {
                Console.WriteLine(person);
            }
        }
        public static void Main()
        {
            Person kiroPeson = new Person("Kiro", 21);

            kiroPeson.Email = "*****@*****.**";

            Console.WriteLine(kiroPeson);

            var peshoPerson = new Person("Pesho", 28, "*****@*****.**");

            Console.WriteLine(peshoPerson);
        }
Пример #17
0
 static void Main()
 {
     var persons = new Person[]
     {new Person("Maria Peshova"),
         new Person ("Pesho Peshev", 56),
         new Person("Gosho Peshov", 0)
     };
     foreach (var person in persons)
     {
         Console.WriteLine(person.ToString());
     }
 }
Пример #18
0
 static void Main(string[] args)
 {
     Console.WriteLine("Hello World!");
     Persons.Person[] personArr = new Persons.Person[5];
     personArr[0] = new Persons.Person("a", "A", "*****@*****.**", "12 january 1999");
     personArr[1] = new Persons.Person("b", "B", "*****@*****.**", "25 july 2005");
     personArr[2] = new Persons.Person("c", "C", "*****@*****.**", "16 june 1999");
     personArr[3] = new Persons.Person("d", "D", "*****@*****.**", "12 december 2021");
     personArr[4] = new Persons.Person("e", "E", "*****@*****.**", "21 july 2001");
     Console.WriteLine($"Name\t Birthdate \t\t Email \t\t Adult \t Birthday \t Sugessted\t Chinese \t Sun ");
     foreach (var item in personArr)
     {
         Console.WriteLine($"{item.firstName} {item.lastName}\t{item.birthDate}\t{item.Email}\t{item.Adult}\t{item.BirthDayBool}\t\t{item.ScreenName}\t{item.ChineseSign}\t\t{item.SunSign}");
     }
 }
        public static void Main(string[] args)
        {
            Console.Write("Please, enter a name: ");
            var name = Console.ReadLine();
            Console.Write("Please, enter a a value for age: ");
            var age = int.Parse(Console.ReadLine());
            Console.Write("Please, enter an email: ");
            var email = Console.ReadLine();

            Person firstPerson = new Person(name, age, email);
            //Person secondPerson = new Person("Stoqn", 22);

            Console.WriteLine(firstPerson.ToString());
            //Console.WriteLine(secondPerson.ToString());
        }
Пример #20
0
        static void Main()
        {
            Console.Write("Enter name: ");
            string name = Console.ReadLine();
            Console.Write("Enter age: ");
            int age = int.Parse(Console.ReadLine());
            Console.Write("Enter email: (optional)");
            string email = Console.ReadLine();

            if (email == "")
            {
                email = null;
            }

            Person person = new Person(name, email, age);
            Console.WriteLine(person);
        }
Пример #21
0
        static void Main(string[] args)
        {
            try
            {
                var person = new Person("Aleksandur", 21);
                Console.WriteLine(person);

                var person2 = new Person("Sashe", 30, "*****@*****.**");
                Console.WriteLine(person2);

                var person3 = new Person("Sashe", 30, "d0ntth1ncgmail.com");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
        static void Main()
        {
            Person nick = new Person("Nick", 33);
            Person stamat = new Person("Stamat", 39, "*****@*****.**");
            Person mimi = new Person("Mimi", 22, "*****@*****.**");

            var people = new List<Person>()
            {
                nick,
                stamat,
                mimi
            };

            foreach (var person in people)
            {
                Console.WriteLine(person);
            }
        }
Пример #23
0
 static void Main(string[] args)
 {
     Person ivan = new Person("Ivan", 15, "*****@*****.**");
     Console.WriteLine(ivan);
     Person gosho = new Person("Gosho", 20);
     Console.WriteLine(gosho);
     Person mitko = new Person("", -2, "");
     Console.WriteLine(mitko);
 }
Пример #24
0
        public static void Main()
        {
            Person per1 = new Person("Barny", 23, "asdasd");

            Console.WriteLine(per1);
        }
Пример #25
0
        public static void Main()
        {
            var person = new Person("Joe", 25, "*****@*****.**");

            Console.WriteLine(person.ToString());
        }
Пример #26
0
 static void Main()
 {
     Person pesho = new Person("Pesho", 22, "*****@*****.**");
     Console.WriteLine(pesho.ToString());
 }
Пример #27
0
        static void Main()
        {
            Person pesho = new Person("Pesho", 22, "*****@*****.**");

            Console.WriteLine(pesho.ToString());
        }
Пример #28
0
 public static void Main(string[] args)
 {
     Person stefan = new Person("Stefan", 20);
     Console.WriteLine(stefan);
 }