Skip to main content
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DefinedNameCollection.Contains(DefinedName) Method

Indicates whether the collection contains the specified defined name.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.2.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