Exemplo n.º 1
0
        public bool SerializeDeserializeTest(ListRandom list)
        {
            var buffSizeOfElement = 255;
            var streamBuffSize    = buffSizeOfElement * list.Count;
            var stream            = new MemoryStream(streamBuffSize);

            list.Serialize(stream);

            stream.Position = 0;

            var list2 = new ListRandom();

            list2.Deserialize(stream);

            stream.Close();
            return(list.Equals(list2));
        }