DataGridViewCell.Clone Method ()


Creates an exact copy of this cell.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public virtual object Clone()

Return Value

Type: System.Object

An Object that represents the cloned DataGridViewCell.

Override the Clone method whenever you derive from the DataGridViewCell class and add new properties to the derived class.

Notes to Inheritors:

When overriding the Clone method in a derived class, call the base class's Clone method so that the properties of the base class are copied to the new cell, and be sure to also copy the values of any properties that were added to the derived class.

.NET Framework
Available since 2.0
Return to top