AngleSharp by Florian Rappl

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

.NET API 1,113,600 bytes

 HtmlTableSectionElement

Represents the object for HTML table section (thead / tbody / tfoot) elements.
using AngleSharp.Dom.Collections; using AngleSharp.Dom.Css; using AngleSharp.Extensions; using AngleSharp.Html; namespace AngleSharp.Dom.Html { internal sealed class HtmlTableSectionElement : HtmlElement, IHtmlTableSectionElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle { private HtmlCollection<IHtmlTableRowElement> _rows; public HorizontalAlignment Align { get { return GetOwnAttribute(AttributeNames.Align).ToEnum(HorizontalAlignment.Center); } set { SetOwnAttribute(AttributeNames.Align, value.ToString()); } } public IHtmlCollection<IHtmlTableRowElement> Rows => _rows ?? (_rows = new HtmlCollection<IHtmlTableRowElement>(this, false, null)); public VerticalAlignment VAlign { get { return GetOwnAttribute(AttributeNames.Valign).ToEnum(VerticalAlignment.Middle); } set { SetOwnAttribute(AttributeNames.Valign, value.ToString()); } } public HtmlTableSectionElement(Document owner) : this(owner, Tags.Tbody, null) { } public HtmlTableSectionElement(Document owner, string name, string prefix = null) : base(owner, name, prefix, NodeFlags.Special | NodeFlags.ImplicitelyClosed | NodeFlags.HtmlTableSectionScoped) { } public IHtmlTableRowElement InsertRowAt(int index = -1) { IHtmlTableRowElement htmlTableRowElement = Rows[index]; IHtmlTableRowElement htmlTableRowElement2 = base.Owner.CreateElement(Tags.Tr) as IHtmlTableRowElement; if (htmlTableRowElement != null) InsertBefore(htmlTableRowElement2, htmlTableRowElement); else AppendChild(htmlTableRowElement2); return htmlTableRowElement2; } public void RemoveRowAt(int index) { Rows[index]?.Remove(); } } }