Returns the index of the specified System.Web.UI.Design.TemplateGroup object within the collection.
- group
- The System.Web.UI.Design.TemplateGroup to locate within the collection.
The zero-based index of the first occurrence of group within the collection; otherwise, -1, if group is not in the collection.
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.