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 會從集合中移除 第一個出現的 formatDesignerAutoFormatCollection如果 物件不包含 format ,則集合會保持不變。 不會擲回任何例外狀況。

方法會 Remove 藉由在 Equals 比較的物件上使用 DesignerAutoFormat 方法來判斷相等。

方法 Remove 會執行線性搜尋;因此,平均執行時間會與 Count 值成正比。

若要從集合中移除位於特定索引的格式,請使用 RemoveAt 方法。 若要從集合中移除所有格式,請使用 Clear 方法。

注意

當您從集合中移除專案時,索引值會變更集合中的後續專案。

適用於

另請參閱