[]
Gets the sort field at the specified index in the sort field list.
Use this indexer to retrieve a sort field that has been added to the current ISortFields collection.
ISortField this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As ISortField
| Type | Name | Description |
|---|---|---|
| int | index | The index of the sort field to retrieve. |
| Type | Description |
|---|---|
| ISortField | The sort field at the specified index. |
worksheet.Range["A1:B4"].Value = new object[,] {
{"Score", "Name"},
{2, "B"},
{1, "C"},
{1, "A"}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B4"], true);
ISortFields sortFields = table.Sort.SortFields;
sortFields.Add(new ValueSortField(worksheet.Range["A2:A4"], SortOrder.Ascending));
ISortField sortField = sortFields[0];