Remove
BaseWebExtensionCollection<T>.Remove method
Removes the item at the specified index from the collection.
public void Remove(int index)
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based index of the collection item. |
Examples
Shows how to work with a document’s collection of web extensions.
Document doc = new Document(MyDir + "Web extension.docx");
Assert.That(doc.WebExtensionTaskPanes.Count, Is.EqualTo(1));
// Print all properties of the document's web extension.
WebExtensionPropertyCollection webExtensionPropertyCollection = doc.WebExtensionTaskPanes[0].WebExtension.Properties;
using (IEnumerator<WebExtensionProperty> enumerator = webExtensionPropertyCollection.GetEnumerator())
{
while (enumerator.MoveNext())
{
WebExtensionProperty webExtensionProperty = enumerator.Current;
Console.WriteLine($"Binding name: {webExtensionProperty.Name}; Binding value: {webExtensionProperty.Value}");
}
}
// Remove the web extension.
doc.WebExtensionTaskPanes.Remove(0);
Assert.That(doc.WebExtensionTaskPanes.Count, Is.EqualTo(0));
See Also
- class BaseWebExtensionCollection<T>
- namespace Aspose.Words.WebExtensions
- assembly Aspose.Words