コード例 #1
0
        /// <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);
        }
コード例 #2
0
    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'));
    }
コード例 #3
0
 public void TestCharReadRedLight()
 {
     byte[] arr = new byte[sizeof(char)];
     ByteManipulator.Write(arr, 0, 'b');
     Assert.That(ByteManipulator.ReadChar(arr, 0), Is.Not.EqualTo('a'));
 }