blob: 32617b45a462534071b5c775bf8bf70c7dd63cc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
using System.Collections;
namespace RhSolutions.ExcelExtensions;
public sealed class Row : Table, IEnumerable<TableCell>
{
public int Index
{
get => Range.Row - ParentTable.Range.Row;
}
public int Length
{
get => Range.Columns.Count;
}
public Row(Range range, Table table) : base(range, table)
{
Range = range;
ParentTable = table;
}
public TableCell this[int index]
{
get => new(Range.Cells[1, index + 1], ParentTable);
}
public IEnumerator<TableCell> GetEnumerator()
{
return new RowEnumerator(Range, ParentTable);
}
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
}
|