[]
Gets a specific IBorder object from the collection by using a BordersIndex value.
Use this indexer to access an edge border, inside border, or diagonal border.
IBorder this[BordersIndex index] { get; }
ReadOnly Default Property Item(index As BordersIndex) As IBorder
| Type | Name | Description |
|---|---|---|
| BordersIndex | index | The BordersIndex value that identifies the border. |
IBorders borders = worksheet.Range["B2:E6"].Borders;
IBorder topBorder = borders[BordersIndex.EdgeTop];
topBorder.LineStyle = BorderLineStyle.Thick;
topBorder.Color = Color.Red;
IBorder diagonalDown = borders[BordersIndex.DiagonalDown];
diagonalDown.LineStyle = BorderLineStyle.Thin;