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()); }
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()); }
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()); }
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()); }
static void Main() { Person pesho = new Person("Pesho", 22, "*****@*****.**"); Console.WriteLine(pesho.ToString()); }
public static void Main() { var person = new Person("Joe", 25, "*****@*****.**"); Console.WriteLine(person.ToString()); }