DataGridViewHeaderCell.Clone DataGridViewHeaderCell.Clone DataGridViewHeaderCell.Clone DataGridViewHeaderCell.Clone Method

定義

建立與這個儲存格完全相同的複本。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,表示複製的 DataGridViewHeaderCellAn Object that represents the cloned DataGridViewHeaderCell.

備註

每當您衍生自DataGridViewHeaderCell並將新的屬性加入至衍生類別時, 覆寫方法。CloneOverride the Clone method whenever you derive from DataGridViewHeaderCell 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.

適用於

另請參閱