/// <summary> /// Reads a value from the packet /// </summary> /// <returns>value</returns> public uint ReadUInt() { uint res = ByteManipulator.ReadUInt32(Data, CurrentSeek); CurrentSeek += sizeof(uint); return(res); }
public void TestListUintReadRedLight() { List <byte> arr = new List <byte>(sizeof(uint)); for (int i = 0; i < sizeof(uint); i++) { arr.Add(0); } ByteManipulator.Write(arr, 0, (uint)25); Assert.That(ByteManipulator.ReadUInt32(arr, 0), Is.Not.EqualTo(9)); }
public void TestUintReadRedLight() { byte[] arr = new byte[sizeof(uint)]; ByteManipulator.Write(arr, 0, (uint)25); Assert.That(ByteManipulator.ReadUInt32(arr, 0), Is.Not.EqualTo(9)); }
public void TestUintRead() { byte[] arr = new byte[sizeof(uint)]; ByteManipulator.Write(arr, 0, (uint)2500000001); Assert.That(ByteManipulator.ReadUInt32(arr, 0), Is.EqualTo(2500000001)); }