static void Main(string[] args) { Person teacher, student; teacher = new Person("Dan", 42); student = new Person("Bobby", 21); string message = teacher.SayHello(student); Console.WriteLine(message); message = student.SayHello(teacher.Name); Console.WriteLine(message); }
public string SayHello(Person that) { return SayHello(that.Name); }