System.Web.UI.Design.DesignerAutoFormatCollection.Remove Method

Removes the specified System.Web.UI.Design.DesignerAutoFormat object from the collection.

Syntax

public void Remove (DesignerAutoFormat format)

Parameters

format
The System.Web.UI.Design.DesignerAutoFormat to remove from the collection.

Remarks

The DesignerAutoFormatCollection.Remove(DesignerAutoFormat) method removes the first occurrence of format from the collection. If the System.Web.UI.Design.DesignerAutoFormatCollection object does not contain format, the collection remains unchanged. No exception is thrown.

The DesignerAutoFormatCollection.Remove(DesignerAutoFormat) method determines equality by using the object.Equals(object) method on the System.Web.UI.Design.DesignerAutoFormat objects that are being compared.

The DesignerAutoFormatCollection.Remove(DesignerAutoFormat) method performs a linear search; therefore, the average execution time is proportional to the DesignerAutoFormatCollection.Count value.

To remove a format at a particular index from the collection, use the DesignerAutoFormatCollection.RemoveAt(int) method. To remove all formats from the collection, use the DesignerAutoFormatCollection.Clear method.

Note:

When you remove an item from a collection, the index values change for subsequent items in the collection.

Requirements

Namespace: System.Web.UI.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 2.0.0.0