ByteBuffer.WriteInt C# (CSharp) Method

WriteInt() public method

public WriteInt ( int v ) : void
v int
return void
    public void WriteInt(int v)
    {
        mBinaryWriter.Write(v);
    }

Usage Example

Example #1
0
        public byte[] ToByteArray(bool cs = false)
        {
            using (ByteBuffer buffer = new ByteBuffer())
            {
                if (!cs)
                {
                    buffer.WriteByte((byte)this.Count);
                }

                foreach (int sn in this)
                {
                    buffer.WriteInt(sn);
                }

                if (cs)
                {
                    for (int i = this.Count; i < 10; i++)
                    {
                        buffer.WriteInt(0);
                    }
                }

                buffer.Flip();
                return(buffer.GetContent());
            }
        }
All Usage Examples Of ByteBuffer::WriteInt