private void expand(int by) { var na = new KeyPaireV[values.Length + by + 8]; Array.Copy(values, 0, na, 0, values.Length); values = na; }
private void expand() { var na = new KeyPaireV[values.Length + 8 * values.Length / 6]; Array.Copy(values, 0, na, 0, values.Length); values = na; }
public void Add(KeyPaireV v) { if (index >= values.Length) { expand(); } values[++index] = v; }
internal void Init(List <Field> fields) { if (fields.Count > values.Length) { expand(fields.Count - values.Length); } foreach (var f in fields) { values[++index] = new KeyPaireV(f.Name, Void.Value); } }