DataGridViewSelectedCellCollection.CopyTo(DataGridViewCell[], Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从指定索引处开始,将集合的元素复制到指定的 DataGridViewCell 数组。
public:
void CopyTo(cli::array <System::Windows::Forms::DataGridViewCell ^> ^ array, int index);
public void CopyTo(System.Windows.Forms.DataGridViewCell[] array, int index);
override this.CopyTo : System.Windows.Forms.DataGridViewCell[] * int -> unit
Public Sub CopyTo (array As DataGridViewCell(), index As Integer)
参数
- array
- DataGridViewCell[]
类型的 DataGridViewCell 一维数组,它是从集合中复制的元素的目标。 数组必须具有从零开始的索引。
- index
- Int32
从零开始复制的索引 array 。
例外
array 是 null。
index 小于零。
DataGridViewCellCollection无法自动强制转换为类型array。