public void MakePerson(int age)
        {
            Person person = new Person();
            person.Age = age;

            if (age % 2 == 0)
            {
                person.Name = "Pencho";
                person.Gender = Gender.Male;
            }
            else
            {
                person.Name = "Penka";
                person.Gender = Gender.Female;
            }
        }
Beispiel #2
0
        public void CreatePerson(int age)
        {
            Person person = new Person();
            person.Age = age;

            if (age % 2 == 0)
            {
                person.Name = "Dude";
                person.Gender = Gender.Male;
            }
            else
            {
                person.Name = "Babe";
                person.Gender = Gender.Female;
            }
        }