Collection Indexer Suggestion

Did you know that you can accomplish the same functionality as your method .GetAt(x, y) by using an indexer on the collection? Its much more user friendly to the programmer. To set it create a property like this.

public Cell this[int row, byte column]
{
get
{
return (Cell)this.GetAt(row, column);
}
}

this would present the user with the ability to access a cell like this

sheet.Cells[3,2].PutValue(some value);

instead of

Cell cell = sheet.Cells.GetAt(3, 2);
cell.PutValue(some value);

Its a little cleaner and a better experience for the user.


Dear Steve,

Thanks for your suggestion.

It’s excellent and we will change all collections’ GetAt to indexer including in Aspose.Excel.

Of course, those collections in Aspose.Chart and Aspose.Pdf will also share the same design, offering the same friendliness and consistence.

I appreciate you or any one else for any suggestion to improve the design of Aspose products.