public int AddRegion(Region region) { i = 0; while (regions.ContainsKey(i)) { i++; } regions.Add(i, region); return i; }