static void e() { Person p1 = new Person("1", "data"); Person p2 = new Person("2", "hata"); IComparable ic = Person.vad(p1, p2); Person p = ic as Person; Console.WriteLine("{0} {1}", p.Name, "\n"); }
static void d() { Temp.MyDelegate d1 = new Temp.MyDelegate(f); Temp.MyDelegate d2 = new Temp.MyDelegate(f); Person p1 = new Person("1342", "anna"); IMyInterface imi = p1; Console.WriteLine(d1(p1, imi)); }
static void b() { Person p1 = new Person("1", "data"); p1 = new Uppgift1().bTemp(p1); IMyInterface2 imi = p1 as IMyInterface2; Console.WriteLine(imi); }
static void c() { A a; Person p1 = new Person("1342", "anna"); a = p1 as A; Console.WriteLine((p1.f(p1.Name)).Equals("anna")); }
static void a() { Person p = new Person("1", "anna"); Person p2 = (Person)p.Clone(); p2.print(); }