[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.BookmarkCollection

Class BookmarkCollection

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents a collection of Bookmark elements.

public class BookmarkCollection : ContentRangeCollection<Bookmark>, IContentList<Bookmark>, IReadOnlyList<Bookmark>, IReadOnlyCollection<Bookmark>, IEnumerable<Bookmark>, IEnumerable
Inheritance
object
BookmarkCollection
Implements
System.Collections.Generic.IReadOnlyList<T><Bookmark>
System.Collections.Generic.IReadOnlyCollection<T><Bookmark>
System.Collections.Generic.IEnumerable<T><Bookmark>
System.Collections.IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

this[string]

Gets a bookmark from the collection by its name.

public Bookmark this[string name] { get; }

Parameters

name string

The bookmark name.

Property Value

Bookmark

The Bookmark with specified name.

Exceptions

System.Collections.Generic.KeyNotFoundException

Raises when the bookmark with specified name not found in the collection.

Methods

Add(string)

Adds a Bookmark into the collection at the Content position.

public Bookmark Add(string name)

Parameters

name string

The new bookmark name.

Returns

Bookmark

The added Bookmark.

Contains(string)

Gets whether the collection contains a bookmark with specified name.

public bool Contains(string name)

Parameters

name string

The bookmark name to find.

Returns

bool

true if the collection contains a bookmark with specified name, otherwise false.

Insert(string, RangeLocation)

Inserts a Bookmark into the collection at the specified position.

public Bookmark Insert(string name, RangeLocation location)

Parameters

name string

The new bookmark name.

location RangeLocation

A RangeLocation for insertion.

Returns

Bookmark

The inserted Bookmark.

TryGetValue(string, out Bookmark)

Gets a bookmark from the collection by its name.

public bool TryGetValue(string name, out Bookmark bookmark)

Parameters

name string

The bookmark name.

bookmark Bookmark

When this method returns, contains the bookmark with the specified name, if the key is found, otherwise null.

Returns

bool

true if the bookmark with the specified name is found, otherwise false.