static void Main(string[] args) { Console.Write("Please enter a Person Name: "); string personName = Console.ReadLine(); Console.Write("Please enter the ages of Person: "); int personAge = int.Parse(Console.ReadLine()); Console.Write("Please enter the email of Person: "); string personEmail = Console.ReadLine(); Person firstPerson = new Person(personName, personAge); Person secondPerson = new Person(personName, personAge, personEmail); Console.WriteLine(firstPerson.ToString()); Console.WriteLine(secondPerson.ToString()); }
static void Main() { Console.WriteLine("Enter your name: "); string name = Console.ReadLine(); Console.WriteLine("Enter your age: "); int age = int.Parse(Console.ReadLine()); Console.WriteLine("Enter your email: "); string email = Console.ReadLine(); Console.WriteLine(); Person p = new Person(name, age, email); Console.WriteLine(p.ToString()); }