/// <summary> /// Reads a value from the packet /// </summary> /// <returns>value</returns> public char ReadChar() { char res = ByteManipulator.ReadChar(Data, CurrentSeek); CurrentSeek += sizeof(char); return(res); }
public void TestListCharReadRedLight() { List <byte> arr = new List <byte>(sizeof(char)); for (int i = 0; i < sizeof(char); i++) { arr.Add(0); } ByteManipulator.Write(arr, 0, 'u'); Assert.That(ByteManipulator.ReadChar(arr, 0), Is.Not.EqualTo('z')); }
public void TestCharReadRedLight() { byte[] arr = new byte[sizeof(char)]; ByteManipulator.Write(arr, 0, 'b'); Assert.That(ByteManipulator.ReadChar(arr, 0), Is.Not.EqualTo('a')); }