System.Web.UI.Design.DesignerRegionCollection.IndexOf Method

Returns the index of the specified System.Web.UI.Design.DesignerRegion object within the collection.

Syntax

public int IndexOf (DesignerRegion region)

Parameters

region
The System.Web.UI.Design.DesignerRegion to locate within the collection.

Returns

The zero-based index of the first occurrence of region within the collection; otherwise, -1, if region is not in the collection.

Remarks

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.

Requirements

Namespace: System.Web.UI.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 2.0.0.0