• shf939899
    shf939899 回复

    The documentation is a bit misleading. Actually it's not a property Item, but an indexer (see the docs) you can use to access the individual items. The actual definition is

    public System.Windows.Forms.DataGridViewCell this[int index] { get; set; }

    If you have an instance of DataGridViewCellCollection, you can use

    DataGridViewCellCollection _collection; // this is a field, irrelevant how it is set
    private DataGridViewCell GetCell(int index)
        return _collection[index]; // here we're accessing the item in the cell collection