Links

Categories

Tags


« | Main | »

I’m so excited…

By Jewe | December 31, 2014

…and I just can’t hide it!

Here’s a sneak peek at what I’m up to right now, fresh from the forge. The code already runs. :)

class C1
{
    method C1(string s)
    {
        name = s;
        age = 45;
    }
    virtual method M1()
    {
        println(name + " " + age);
    }
    method M2()
    {
        M1();
    }
    string name;
    int age;
}

class C2 extends C1
{
    method C2(string n)
        extends C1(n)
    {
        job = "Developer";
    }
    method M2()
    {
        println(name + " " + age + " " + job);
        base.M2();
    }
    method M1()
    {
        println("Overridden!");
    }
    string job;
}

Topics: blog | Comments Off on I’m so excited…

Comments are closed.