Returns the index of the specified System.Web.UI.Design.DesignerRegion object within the collection.
- region
- The System.Web.UI.Design.DesignerRegion to locate within the collection.
The zero-based index of the first occurrence of region within the collection; otherwise, -1, if region is not in the collection.
The DesignerRegionCollection.IndexOf(DesignerRegion) method determines equality by using the object.Equals(object) method on the System.Web.UI.Design.DesignerRegion objects.
The DesignerRegionCollection.IndexOf(DesignerRegion) method performs a linear search; therefore, the average execution time is proportional to the DesignerRegionCollection.Count property. Because template region collections are typically small, the performance of the linear search operation is not critical.