public HtmlNode RemoveChild(HtmlNode oldChild)
{
if (oldChild == null)
{
throw new ArgumentNullException(nameof(oldChild));
}
int index = -1;
if (this._childnodes != null)
{
index = this._childnodes[oldChild];
}
if (index == -1)
{
throw new ArgumentException(HtmlDocument.HtmlExceptionRefNotChild);
}
if (this._childnodes != null)
{
this._childnodes.Remove(index);
}
this._ownerdocument.SetIdForNode((HtmlNode)null, oldChild.GetId());
this._outerchanged = true;
this._innerchanged = true;
return(oldChild);
}