public static void Main(string[] args) { Person Mormor = new Person("Mormor", "MormorEfternavn", 99); Person Morfar = new Person("Morfar", "MorfarEfternavn", 98); Person Farmor = new Person("Farmor", "FarmorEfternavn", 97); Person Farfar = new Person("Farfar", "FarfarEfternavn", 96); Person Mor = new Person("Mor", "MorEfternavn", -32); Person Far = new Person("Far", "FarEfternavn", 22); Person Me = new Person("Mig", "MitEfternavn", 0); Mor.SetFather(Morfar); Mor.SetMother(Mormor); Far.SetFather(Farfar); Far.SetMother(Farmor); Me.SetFather(Far); Me.SetMother(Mor); Me.PrintPerson(); HelloWorld(); float F = 33; float C = FtoC(F); Console.WriteLine(C); MicroToTime((int)Math.Pow(4200, 9)); FileStuffs FileStuff = new FileStuffs(); FileStuff.ListDirectory("/home/nitrous/datalogi"); Vector V = new Vector(3, -1); Vector Z = new Vector(2, 2); V.Add(Z); V.Print(); V.Subtract(Z); V.Print(); Vector X = V.Addition(Z); X.Print(); X = X.Subtraction(Z); X.Print(); return; }
public void PrintPerson(int RecursionLevel = 0) { string Spaces = ""; for (int i = 0; i < RecursionLevel * 4; i++) { Spaces = Spaces + " "; } Console.WriteLine(String.Format("{0} Fornavn: {1} Efternavn: {2} Alder: {3}", Spaces, FirstName, LastName, Age)); if (Father != null) { Father.PrintPerson(RecursionLevel + 1); } if (Mother != null) { Mother.PrintPerson(RecursionLevel + 1); } }