Try running this (and look at the y and z definitions): using System.IO; using System.Runtime; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters; using System.Runtime.Serialization.Formatters.Binary; . . . TreeNode x,y,z; x = new TreeNode("Root"); y = x.Nodes.Add("A"); //it only runs if you comment out these lines z = y.Nodes.Add("1"); //it only runs if you comment out these lines IFormatter formatter = new BinaryFormatter(); Stream mystream = new FileStream("MyFile.bin", FileMode.Create, FileAccess.Write, FileShare.None); formatter.Serialize(mystream, x); mystream.Close(); TreeNode root; mystream = new FileStream("MyFile.bin", FileMode.Open, FileAccess.Read, FileShare.Read); root = (TreeNode)formatter.Deserialize(mystream); MessageBox.Show(root.Text); Thanks for the help :)