DesignerAutoFormatCollection.Remove(DesignerAutoFormat) 方法

定义

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

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

参数

format
DesignerAutoFormat

要从该集合中移除的 DesignerAutoFormat

注解

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

该方法 Remove 通过使用 Equals 所比较的对象的方法 DesignerAutoFormat 来确定相等性。

该方法 Remove 执行线性搜索;因此,平均执行时间与 Count 值成正比。

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

备注

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

适用于

另请参阅