All pastes #538964 Raw Edit

Stuff

public text v1 · immutable
·published 2007-06-05 04:31 UTC
rendered paste body
using System;

class Foo {
        public Foo () {
                bar = new Bar (this);
        }

        protected virtual void foo () {
                Console.WriteLine ("hi");
        }

        public void Blah ()
        {
                bar.Blah ();
        }

        Bar bar;

        public static void Main (string[] args) {
                Foo f = new Foo ();

                f.Blah ();
        }
}

class Bar {
        public Bar (Foo foo) {
        this.foo = foo;
        }

        Foo foo;
        public void Blah () {
                foo.foo ();
        }
}