private void expand() { var na = new KeyPaireF[values.Length + 8 * values.Length / 6]; System.Array.Copy(values, 0, na, 0, values.Length); values = na; }
private void expand(int by) { var na = new KeyPaireF[values.Length + by + 8]; Array.Copy(values, 0, na, 0, values.Length); values = na; }
public void Add(KeyPaireF v) { if (index >= values.Length) { expand(); } values[++index] = v; }