public void LoadMasks() { if (File.Exists("Masks.bin")) { Stream deserializerStream = File.OpenRead("Masks.bin"); BinaryFormatter deserializer = new BinaryFormatter(); MaskManager.Mask[] masks = (MaskManager.Mask[])deserializer.Deserialize(deserializerStream); deserializerStream.Close(); maskManager.AddMasks(masks); } }