Exemplo n.º 1
0
    // The "Main" function is the entry point into the program and is the first (and last) bit of user-code that is executed in the program.
    static void Main(string[] args)
    {
        Console.WriteLine("Hello World!");

        // Call the static function PrintMyClass
        CrazyPoprocks.MyClass123.PrintMyClass();

        // Create an instance of MyClass123
        BongoDrums drums = new BongoDrums();

        drums.PrintBongoDrums();

        BongoDrums.PrintBongoDrumsExplicit(drums);

        // Wait for user input before we exit the program.
        Console.ReadLine();
    }
Exemplo n.º 2
0
 // A member function is simular to calling a static function with a hidden "this" reference input parameter
 public static void PrintBongoDrumsExplicit(BongoDrums outThisReference)
 {
     Console.WriteLine("Print BongoDrums" + outThisReference.classValue + " by outThisReference");
 }