FlatBuffers.ByteBuffer.PutUint C# (CSharp) Method

PutUint() public method

public PutUint ( int offset, uint value ) : void
offset int
value uint
return void
        public unsafe void PutUint(int offset, uint value)
        {
            AssertOffsetAndLength(offset, sizeof(uint));
            fixed (byte* ptr = _buffer)
            {
                *(uint*)(ptr + offset) = BitConverter.IsLittleEndian
                    ? value
                    : ReverseBytes(value);
            }
        }

Usage Example

 public void PutUint(uint x)
 {
     _bb.PutUint(_space -= sizeof(uint), x);
 }