Remove Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Removes an XML element from an XML document.
Syntax
public bool Remove(int index);Public Function Remove(index As Integer) As BooleanParameters
| Parameter | Description |
|---|---|
| index | Specifies the one-based index of the XML element in the collection. If this parameter is zero, the element at the current input position is removed. |
Return Value
The return value is false, if the element could not be removed because the document becomes invalid according to the document's DTD. In this case an XmlInvalid event occurs. The return value is true, if the element could successfully be removed.
Examples
The following example removes an item from the xml element collection.
if (xmlElementCollection.Remove(1))
{
Console.WriteLine("Remove completed successfully.");
}If xmlElementCollection.Remove(1) Then
Console.WriteLine("Remove completed successfully.")
End If