// Main begins program execution. public static void Main() { // Instance of OutputClass OutputClass outCl = new OutputClass("This is printed by the output class."); // Call Output class' method outCl.printString(); }
// Main begins program execution public static void Main() { OutputClass outC1 = new OutputClass("This is printed by the output class."); // Call output class' method outC1.printString(); OutputClass.staticPrinter(); }
// Main begins program execution. public static void Main() { // Instance of OutputClass OutputClass outCl = new OutputClass("This is printed by the output class."); // Call Output class' method outCl.printString(); }
// Main begins program execution. public static void xMain() { // Instance of OutputClass OutputClass outCl = new OutputClass("This is printed by the output class."); // Call Output class' method outCl.printString(); // keep screen from going away // when run from VS.NET Console.ReadLine(); }
public static void ExampleClass() { // Instance of OutputClass var outCl = new OutputClass("This is printed by the output class."); var outC2 = new OutputClass(5); var outC3 = new OutputClass(); // Call Output class' method outCl.printString(); outC2.printString(); outC3.printString(); // Call static field that previously inicializated by static constructor AliasForNamespace.Console.WriteLine(OutputClass._count); // AliasForNamespace.GC.Collect(); // Why GC not work because link on object exist because object in method scope }
// Main begins program execution. public static void Main2() { // Instance of OutputClass // OutputClass outCl = new OutputClass("This is printed by the output class."); OutputClass outCl = new OutputClass("1","2"); // Call Output class' method outCl.printString(); OutputClass oc2 = new OutputClass("OutputClass2"); oc2.printString(); OutputClass.staticPrinter(); }