summaryrefslogtreecommitdiff
path: root/net/FlatBuffers/FlatBufferBuilder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'net/FlatBuffers/FlatBufferBuilder.cs')
-rw-r--r--net/FlatBuffers/FlatBufferBuilder.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/FlatBuffers/FlatBufferBuilder.cs b/net/FlatBuffers/FlatBufferBuilder.cs
index 590e6ac0..4d34ab97 100644
--- a/net/FlatBuffers/FlatBufferBuilder.cs
+++ b/net/FlatBuffers/FlatBufferBuilder.cs
@@ -295,6 +295,18 @@ namespace FlatBuffers
PutInt(_vectorNumElems);
return new VectorOffset(Offset);
}
+
+ /// <summary>
+ /// Creates a vector of tables.
+ /// </summary>
+ /// <param name="offsets">Offsets of the tables.</param>
+ public VectorOffset CreateVectorOfTables<T>(Offset<T>[] offsets) where T : class
+ {
+ NotNested();
+ StartVector(sizeof(int), offsets.Length, sizeof(int));
+ for (int i = offsets.Length - 1; i >= 0; i--) AddOffset(offsets[i].Value);
+ return EndVector();
+ }
/// @cond FLATBUFFERS_INTENRAL
public void Nested(int obj)