OptionCollection
Overview
OptionCollection is a class in Aspose.PDF FOSS for .NET.
Inherits from: ICollection<Option>.
Mutable collection of Option values backed by the owning ChoiceField’s /Opt entry.
This class provides 8 methods for working with OptionCollection objects in .NET programs.
Available methods include: Add, Clear, Contains, CopyTo, GetEnumerator, Remove, get.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: Count, IsReadOnly, IsSynchronized, SyncRoot.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Count | int | Read | Number of options on the owning field. |
IsReadOnly | bool | Read | Always false — the collection is mutable. |
IsSynchronized | bool | Read | Always false — the collection is not thread-safe. |
SyncRoot | object | Read | Synchronization root for the collection. |
Methods
| Signature | Description |
|---|---|
get(index: int) | Method-form indexer (exposes a lowercase get method). |
get(name: string) | Method-form lookup by display name. |
Add(item: Option) | Appends an option to the field’s /Opt array. |
Clear() | Removes all options from the field. |
Contains(item: Option) | Returns true when an option with the same Value+Name exists in the collection. |
CopyTo(array: Option[], index: int) | Copies the materialised options into the supplied array starting at the given offset. |
Remove(item: Option) | Removes the first option whose Value+Name match the supplied option. |
GetEnumerator() | Enumerates the options on the field at call time. |