Exemple #1
0
 public static SimplyInt Read2(Reader reader)
 {
     SimplyInt result = new SimplyInt();
     result.Field1 = -reader.Read<int>();
     result.Field2 = reader.Read<uint>();
     return result;
 }
Exemple #2
0
        public static SimplyInt Read2(Reader reader)
        {
            SimplyInt result = new SimplyInt();

            result.Field1 = -reader.Read <int>();
            result.Field2 = reader.Read <uint>();
            return(result);
        }
Exemple #3
0
        public void Write()
        {
            ByteWriter s = new ByteWriter();

            WriteBuilder b = new WriteBuilder();
            Writer w = b.Create(s);

            SimplyInt val = new SimplyInt();
            val.Field1 = 0x1234ABCD;
            val.Field2 = 0xCDEF9876;

            w.Write<SimplyInt>(val);

            Assert.AreEqual(new byte[]{0x12, 0x34, 0xAB, 0xCD, 0xCD, 0xEF, 0x98, 0x76}, s.ToArray());
        }