public class MyObjectView {
	public delegate void MyAction ();

	public MyObjectView (MyObject o, MyAction a) {
		a ();
	}
}

public class MyObject {
	public int x { get; private set; }

	public MyObject (int x_) {
		x = x_;
	}
}

int main(string[] argv) {
	List<MyObject> list = null;
	list.append (new MyObject (4));
	list.append (new MyObject (5));

	foreach (var o in list) {
		new MyObjectView (o, () => {
				if (o.x == 5) {
					print ("Five\n");
				} else {
					print ("not Five\n");
				}
			});
	}

	return 0;
}
