private int GetControlIndex() { int i = 0; while (true) { bool b = _pnlCameras.Controls.Cast<Control>().Any(c => c.Tag as int? == i); if (!b) { return i; } i++; } }