Class BookmarksOutlineLevelCollection

Class BookmarksOutlineLevelCollection

Namespace: Aspose.Words.Saving
Assembly: Aspose.Words.dll (25.4.0)

A collection of individual bookmarks outline level.

To learn more, visit the Working with Bookmarks documentation article.

public class BookmarksOutlineLevelCollection : IEnumerable<keyvaluepair<string, int="">&gt;, IEnumerable

Inheritance

object BookmarksOutlineLevelCollection

Implements

IEnumerable<keyvaluepair<string, int="">&gt; , IEnumerable

Inherited Members

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Remarks

Key is a case-insensitive string bookmark name. Value is a int bookmark outline level.

Bookmark outline level may be a value from 0 to 9. Specify 0 and Word bookmark will not be displayed in the document outline. Specify 1 and Word bookmark will be displayed in the document outline at level 1; 2 for level 2 and so on.

Constructors

BookmarksOutlineLevelCollection()

public BookmarksOutlineLevelCollection()

Properties

Count

Gets the number of elements contained in the collection.

public int Count { get; }

Property Value

int

this[string]

Gets or a sets a bookmark outline level by the bookmark name.

public int this[string name] { get; set; }

Property Value

int

this[int]

Gets or sets a bookmark outline level at the specified index.

public int this[int index] { get; set; }

Property Value

int

Methods

Add(string, int)

Adds a bookmark to the collection.

public void Add(string name, int outlineLevel)

Parameters

name string

The case-insensitive name of the bookmark to add.

outlineLevel int

The outline level of the bookmark. Valid range is 0 to 9.

Clear()

Removes all elements from the collection.

public void Clear()

Contains(string)

Determines whether the collection contains a bookmark with the given name.

public bool Contains(string name)

Parameters

name string

Case-insensitive name of the bookmark to locate.

Returns

bool

true if item is found in the collection; otherwise, false.

GetEnumerator()

Returns an enumerator object that can be used to iterate over all items in the collection.

public IEnumerator<keyvaluepair<string, int="">&gt; GetEnumerator()

Returns

IEnumerator < KeyValuePair < string , int &gt;&gt;

IndexOfKey(string)

Returns the zero-based index of the specified bookmark in the collection.

public int IndexOfKey(string name)

Parameters

name string

The case-insensitive name of the bookmark.

Returns

int

The zero based index. Negative value if not found.

Remove(string)

Removes a bookmark with the specified name from the collection.

public void Remove(string name)

Parameters

name string

The case-insensitive name of the bookmark.

RemoveAt(int)

Removes a bookmark at the specified index.

public void RemoveAt(int index)

Parameters

index int

The zero based index. </keyvaluepair<string,></keyvaluepair<string,></keyvaluepair<string,>

 English