Back to Devexpress

DefinedNameCollection.Contains(DefinedName) Method

officefileapi-devexpress-dot-spreadsheet-dot-definednamecollection-dot-contains-x28-devexpress-dot-spreadsheet-dot-definedname-x29.md

latest3.2 KB
Original Source

DefinedNameCollection.Contains(DefinedName) Method

Indicates whether the collection contains the specified defined name.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
bool Contains(
    DefinedName item
)
vb
Function Contains(
    item As DefinedName
) As Boolean

Parameters

NameTypeDescription
itemDefinedName

A DefinedName object to locate in the collection.

|

Returns

TypeDescription
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

Defined Names

DefinedNameCollection Interface

DefinedNameCollection Members

DevExpress.Spreadsheet Namespace