DataGridViewButtonCell.Clone 方法

定义

创建此单元格的精确副本。Creates an exact copy of this cell.

public:
 override System::Object ^ Clone();
public override object Clone ();
override this.Clone : unit -> obj
Public Overrides Function Clone () As Object

返回

Object

一个 Object,表示克隆的 DataGridViewButtonCellAn Object that represents the cloned DataGridViewButtonCell.

注解

Clone每当从派生的 DataGridViewButtonCell 类派生并将新属性添加到派生类时,重写方法。Override the Clone method whenever you derive from DataGridViewButtonCell and add new properties to the derived class.

继承者说明

Clone() 在派生类中重写时,调用基类的 Clone() 方法,以便将基类的属性复制到新的单元格,并确保还复制已添加到派生类的任何属性的值。When overriding Clone() 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.

适用于

另请参阅