static bool f2() { Person p1 = new Person("1342", "anna"); Console.WriteLine(p1.whoAreYou("eva")); return false; }
public void print(Person p) { Console.WriteLine(p.Name); }
static void d() { Person p1 = new Person("1", "anna"); Person p2 = new Person("2", "data"); Person p3 = p1 * p2; p3.print(p3); }
static void c() { IMyInterface1 imi; Person p1 = new Person("1342", "data"); imi = p1 as IMyInterface1; Console.WriteLine(imi.whoAreYou(imi) + "\n"); }
static void b() { Person p1 = new Person("1", "anna"); Uppgift1 u = new Uppgift1(); Console.WriteLine(u.Temp(p1) + "\n"); }
static void a() { Person p1 = new Person("1", "anna"); Person p2 = p1; p2.print(); object o = p2; Console.WriteLine(o.GetType() + "\n"); }
public new void print(Person p) { string s = "Mina studenter "; s += p.Name; s += teacher.Insert(8, " älskar sina"); Console.WriteLine("Result =" + "\n" + s + "\n" + p.id + "\n"); }