TemplateGroupCollection.Remove(TemplateGroup) 方法

定义

从集合中移除指定的 TemplateGroup 对象。

public:
 void Remove(System::Web::UI::Design::TemplateGroup ^ group);
public void Remove (System.Web.UI.Design.TemplateGroup group);
member this.Remove : System.Web.UI.Design.TemplateGroup -> unit
Public Sub Remove (group As TemplateGroup)

参数

group
TemplateGroup

要从该集合中移除的 TemplateGroup

注解

该方法 Remove 从集合中删除第一个 group 匹配项。 TemplateGroupCollection如果对象不包含group,则集合保持不变。 不会引发异常。

该方法 Remove 通过使用 Equals 对象上的 TemplateGroup 方法确定相等性。

该方法 Remove 执行线性搜索;因此,平均执行时间与 Count 属性成正比。 由于模板组集合通常很小,因此线性搜索操作的性能并不重要。

若要从集合中删除特定索引处的组,请使用 RemoveAt 该方法。 若要从集合中删除所有组,请使用 Clear 该方法。

备注

从集合中删除项时,索引会更改集合中的后续项。

适用于

另请参阅