Example #1
0
        public sbyte[] GetBytes(int order)
        {
            bool[]    items = this.items;
            ArrayByte bytes = new ArrayByte(items.Length);

            bytes.SetOrder(order);
            for (int i = 0; i < items.Length; i++)
            {
                bytes.WriteBoolean(items[i]);
            }
            return(bytes.GetBytes());
        }
Example #2
0
        public sbyte[] GetBytes(int order)
        {
            char[]    items = this.items;
            int       size  = items.Length;
            ArrayByte bytes = new ArrayByte(size * 2);

            bytes.SetOrder(order);
            for (int i = 0; i < size; i++)
            {
                bytes.WriteChar(items[i]);
            }
            return(bytes.GetBytes());
        }