Your classes don't make any sense at all. In Map you have a circular definition and a structure that consists of only one variable. In Tile you have a single variable but everywhere else refer to Tile as defined by two parameters. And what's happening in Layer is beyond me entirely. With the best will in the world you really don't know what you're doing, do you? This may help http://www.homeandlearn.co.uk/net/nets11p5.html although I suspect that you actually need a much more thorough grounding in the use of classes altogether.