Fixed struct initialization error on older versions of C#

"'this' object cannot be used before all of its fields are assigned to"

Change-Id: Icccdcc0d0be0fe0b87abe0eb28fe1cc91116fcfb
parent 9b132013
......@@ -25,7 +25,7 @@ namespace FlatBuffers
public ByteBuffer bb { get; private set; }
// Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within.
public Struct(int _i, ByteBuffer _bb)
public Struct(int _i, ByteBuffer _bb) : this()
{
bb = _bb;
bb_pos = _i;
......
......@@ -31,7 +31,7 @@ namespace FlatBuffers
public ByteBuffer ByteBuffer { get { return bb; } }
// Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within.
public Table(int _i, ByteBuffer _bb)
public Table(int _i, ByteBuffer _bb) : this()
{
bb = _bb;
bb_pos = _i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment