I have a problem with ArrayLists<BR><BR>I have a class structure x<BR><BR>ArrayList Alllvls = new ArrayList();<BR>ArrayList lvl = new ArrayList();<BR><BR>lvl.Add(x); -- sets lvl OK<BR>Alllvls.Add(lvl) -- fails here<BR><BR> with the following error :<BR><BR> [NullReferenceException: Object reference not set to an instance of an object.]<BR><BR>Can anyone help?<BR>I found the problem. It was a typo in the Outermost ArrayList declaration.<BR><BR>public ArrayList x; - compiles but there is no object reference unless<BR><BR>public ArrayList x = new ArrayList();<BR><BR>