Пример #1
0
 static void a()
 {
     Person p = new Person("1", "anna");
     p.print();
 }
Пример #2
0
 static void e()
 {
     Person p1 = new Person("1342", "anna");
     object p2 = new Person("1562", "fatso");
     p2 = p1;
     Console.WriteLine(p1 == p2);
 }
Пример #3
0
 static void c()
 {
     A a;
     Person p1 = new Person("1342", "anna");
     a = p1;
     p1 = a as Person;
     Console.WriteLine(p1.f(p1.Name));
 }
Пример #4
0
 static void d()
 {
     Temp.MyDelegate d = new Temp.MyDelegate(f);
     Person p1 = new Person("1342", "anna");
     IMyInterface imi = p1;
     bool b = d(new Person(), imi);
     Console.WriteLine(b);
 }
Пример #5
0
 static void b()
 {
     Person p1 = new Person("1", "data");
     new Test().bTemp(p1);
     p1.print();
 }