System.Web.UI.Design.TemplateGroupCollection.IndexOf Method

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

Syntax

public int IndexOf (TemplateGroup group)

Parameters

group
The System.Web.UI.Design.TemplateGroup to locate within the collection.

Returns

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

Remarks

The TemplateGroupCollection.IndexOf(TemplateGroup) method determines equality by using the object.Equals(object) method on the System.Web.UI.Design.TemplateGroup objects.

The TemplateGroupCollection.IndexOf(TemplateGroup) performs a linear search; therefore, the average execution time is proportional to the TemplateGroupCollection.Count property. Because template group collections typically are 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