VariableCollection

VariableCollection

Overview

VariableCollection is a class in Aspose.Words FOSS for .NET. Inherits from: IEnumerable<KeyValuePair<string, string>>.

A collection of document variables.

This class provides 7 methods for working with VariableCollection objects in .NET programs. Available methods include: Add, Clear, Contains, GetEnumerator, IndexOfKey, Remove, RemoveAt. All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package. Properties: Count.

Properties

NameTypeAccessDescription
CountintReadGets the number of elements contained in the collection.

Methods

SignatureDescription
GetEnumerator()Returns an enumerator object that can be used to iterate over all variable in the collection.
Add(name: string, value: string)Adds a document variable to the collection.
Contains(name: string)Determines whether the collection contains a document variable with the given name.
IndexOfKey(name: string)Returns the zero-based index of the specified document variable in the collection.
Remove(name: string)Removes a document variable with the specified name from the collection.
RemoveAt(index: int)Removes a document variable at the specified index.
Clear()Removes all elements from the collection.

See Also