public void print(Person p)
 {
     Console.WriteLine(p.Name);
 }
 static bool f2(Person a, Person b)
 {
     return (Object.ReferenceEquals(a, b));
 }
 static bool f2()
 {
     Person p1 = new Person("1342", "anna");
     Console.WriteLine(p1.whoAreYou("eva"));
     return false;
 }
 static void e()
 {
     //Nedanstående rad går ej att köra, ger kompileringsfel. Matchar inte delegatens signatur
     // MyDelegate d = new MyDelegate(f2);
     //Istället kan man skriva såhär:
     MyDelegate d = new MyDelegate(f);
     Person p1 = new Person("1342", "anna");
     Person p2 = new Person("1342", "anna");
     p1 = p2;
     bool b = d(p1, p2);
     Console.WriteLine(b);
 }
 static void d()
 {
     MyDelegate d = new MyDelegate(f);
     Person p1 = new Person("1342", "anna");
     Person p2 = new Person("1342", "anna");
     p1 = p2;
     bool b = d(p1, p2);
     Console.WriteLine(b + "\n");
 }
 static void c()
 {
     IMyInterface1 imi;
     Person p1 = new Person("1342", "anna");
     object o = p1;
     imi = o as IMyInterface1;
     Console.WriteLine(imi.whoAreYou(imi) + "\n");
 }
 static void b()
 {
     Person p1 = new Person("1", new Uppgift1().name);
     Console.WriteLine(new Uppgift1().bTemp(p1) + "\n");
 }
 static void a()
 {
     Person p = new Person("1", "anna");
     object p2 = p.Clone();
     ((Person)p2).print();
     Console.WriteLine(p2.GetType() + "\n");
 }