private static void trash() { // The code provided will print ‘Hello World’ to the console. // Press Ctrl+F5 (or go to Debug > Start Without Debugging) to run your app. int[] arr = { 1, 2, 3, 6 }; AwesomeClass aC = new AwesomeClass(); EvenBetterClass eBC = new EvenBetterClass(); aC.SetAwesomeClass("torkness", "tajneHaslo", 433); aC.SetAwesomeClass("dawddragon", "strasznieTajneHaslo", 8080); aC.SetAwesomeClass("daniel.matysiewicz", "Haslo", 22); AwesomeClass.StaticClass("d"); aC.Usr = "******"; aC.readData(); foreach (int a in arr) { Console.WriteLine(a); } EvenBetterClass.StaticClassRefTest(arr); foreach (int a in arr) { Console.WriteLine(a); } EvenBetterClass.StaticClassRefTest(arr); foreach (int a in arr) { Console.WriteLine(a); } EvenBetterClass.StaticClassRefTest(arr); foreach (int a in arr) { Console.WriteLine(a); } AwesomeClass.StaticClass("d"); Program.TryCatch(1); Program.TryCatch(4); Program.TryCatch(0); Console.WriteLine("Hello again cruel World!"); Console.ReadKey(); // Go to http://aka.ms/dotnet-get-started-console to continue learning how to build a console app! }
private static void Inheritance() { Console.WriteLine($"-----Inheritance-----"); AwesomeClass aC = new AwesomeClass(); EvenBetterClass eBC = new EvenBetterClass(); aC.Elo_From_The_Other_Side(); eBC.Elo_From_The_Other_Side(); AwesomeClass.StaticClass("AC"); EvenBetterClass.StaticClass("EBC"); Console.WriteLine("aC is Awesome: " + ((aC is AwesomeClass)?"true":"false")); Console.WriteLine("aC is EvenBetter: " + ((aC is EvenBetterClass) ? "true" : "false")); Console.WriteLine("eBC is Awesome: " + ((eBC is AwesomeClass) ? "true" : "false")); Console.WriteLine("eBC is EvenBetter: " + ((eBC is EvenBetterClass) ? "true" : "false")); Console.WriteLine($"---------------------"); }