Editar

Compartilhar via


DataGridViewCellCollection.IList.Clear Method

Definition

Clears the collection.

 virtual void System.Collections.IList.Clear() = System::Collections::IList::Clear;
void IList.Clear ();
abstract member System.Collections.IList.Clear : unit -> unit
override this.System.Collections.IList.Clear : unit -> unit
Sub Clear () Implements IList.Clear

Implements

Exceptions

The row that owns this DataGridViewCellCollection already belongs to a DataGridView control.

Remarks

Once you add the row to a control, the number of cells it contains always matches the number of columns in the control, so this method is no longer useful.

This member is an explicit interface member implementation. It can be used only when the DataGridViewCellCollection instance is cast to an IList interface.

Applies to

See also