Share via


HtmlElement.RemoveChild Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Removes the specified element from the child element collection of the current HTML element.

Namespace:  System.Windows.Browser
Assembly:  System.Windows.Browser (in System.Windows.Browser.dll)

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Sub RemoveChild ( _
    element As HtmlElement _
)
[SecuritySafeCriticalAttribute]
public void RemoveChild(
    HtmlElement element
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

element is nulla null reference (Nothing in Visual Basic).

InvalidOperationException

All other errors.

Remarks

If element is not in the child element collection of the current HTML element, the method returns without error.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.