static void Main() { Person firstPerson = new Person("Pesho", 25); Person secondPerson = new Person("Gerasim"); Console.WriteLine(firstPerson.ToString()); Console.WriteLine(secondPerson.ToString()); }
static void Main() { var person = new Person() { Name = "Ivan", Age = 18 }; var anotherPerson = new Person() { Name = "Gosho" }; Console.WriteLine(person.ToString()); Console.WriteLine(anotherPerson.ToString()); }
static void Main() { Person firstPerson = new Person("Stamat Ivanov"); Person secondPerson = new Person("Pesho Georgiev", 23); Console.WriteLine(firstPerson.ToString()); Console.WriteLine(secondPerson.ToString()); }
static void Main(string[] args) { Person gosho = new Person(""); Console.WriteLine(gosho.ToString()); }