Skip to main content
Row

DefinedNameCollection.Contains(DefinedName) Method

Indicates whether the collection contains the specified defined name.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

bool Contains(
    DefinedName item
)

Parameters

Name Type Description
item DefinedName

A DefinedName object to locate in the collection.

Returns

Type Description
Boolean

true, if the collection contains the defined name; otherwise, false.

Remarks

Each defined name has a scope that can be a particular worksheet or entire workbook. So, each worksheet and workbook has it’s own collection of defined names (DefinedNameCollection) that is accessed via the Worksheet.DefinedNames or Workbook.DefinedNames property respectively. Each name must be unique in its scope. To check whether a specific name already exists in a scope, use the Contains method.

To obtain the specified defined name from the collection, use the DefinedNameCollection.GetDefinedName method.

To add a new defined name to the collection, use the DefinedNameCollection.Add method.

To delete defined names from the collection, use the DefinedNameCollection.Remove, DefinedNameCollection.RemoveAt or DefinedNameCollection.Clear methods.

See Also