AngleSharp by Florian Rappl

<PackageReference Include="AngleSharp" Version="0.3.5" />

.NET API 553,472 bytes

 HTMLTableSectionElement

Represents the object for HTML table section (thead / tbody / tfoot) elements.
using AngleSharp.DOM.Collections; namespace AngleSharp.DOM.Html { [DOM("HTMLTableSectionElement")] public sealed class HTMLTableSectionElement : HTMLElement, IImplClosed, ITableSectionScopeElement { private HTMLLiveCollection<HTMLTableRowElement> _rows; [DOM("align")] public HorizontalAlignment Align { get { return Element.ToEnum(GetAttribute("align"), HorizontalAlignment.Center); } set { SetAttribute("align", value.ToString()); } } [DOM("rows")] public HTMLCollection Rows { get { return _rows; } } [DOM("vAlign")] public VerticalAlignment VAlign { get { return Element.ToEnum(GetAttribute("valign"), VerticalAlignment.Middle); } set { SetAttribute("valign", value.ToString()); } } protected internal override bool IsSpecial => true; internal HTMLTableSectionElement() { _name = "tbody"; _rows = new HTMLLiveCollection<HTMLTableRowElement>(this, true); } [DOM("insertRow")] public HTMLTableRowElement InsertRow(int index) { Element element = Rows[index]; HTMLTableRowElement hTMLTableRowElement = base.OwnerDocument.CreateElement("tr") as HTMLTableRowElement; if (element != null) InsertBefore(hTMLTableRowElement, element); else AppendChild(hTMLTableRowElement); return hTMLTableRowElement; } [DOM("deleteRow")] public HTMLTableSectionElement DeleteRow(int index) { Rows[index]?.Remove(); return this; } } }