Example #1
0
        public void ClassInStructure()
        {
            var inStruct = new ClassInStructure();

            inStruct.field = new ArrayInClass()
            {
                field = new int[] { 6, 60 }
            };
            byte[]           data  = BytesStream.Serialize(inStruct);
            ClassInStructure decod = BytesStream.Deserialize <ClassInStructure>(data);

            Assert.IsTrue(inStruct.Equals(decod));
        }
Example #2
0
        public void ClassInStructureArray()
        {
            var inStructArr = new ClassInStructure[1] {
                new ClassInStructure()
            };

            inStructArr[0].field = new ArrayInClass()
            {
                field = new int[] { 6, 60 }
            };
            byte[]             data  = BytesStream.Serialize(inStructArr);
            ClassInStructure[] decod = BytesStream.Deserialize <ClassInStructure[]>(data);
            Assert.IsTrue(inStructArr[0].Equals(decod[0]));
        }