[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.Fields.TocStyleLevelCollection.Add

Add Method

Add(string, OutlineLevel)

Adds the specified style to the collection.

Declaration
public TocStyleLevel Add(string name, OutlineLevel displayLevel)
Public Function Add(name As String, displayLevel As OutlineLevel) As TocStyleLevel
Parameters
Type Name Description
string name

The style name.

OutlineLevel displayLevel

The outline level on which to display the collected paragraphs in the TOC field result.

Returns
Type Description
TocStyleLevel

The newly created TocStyleLevel instance.

Exceptions
Type Condition
ArgumentException

Thrown when name is null or an empty string.

ArgumentException

Thrown when the style with the given name already exist in the collection.