[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IDocumentPropertyCollection.IndexOf

IndexOf Method

IndexOf(string)

Gets the index of a property by name.

Declaration
int IndexOf(string name)
Function IndexOf(name As String) As Integer
Parameters
Type Name Description
string name

The case-insensitive name of the property.

Returns
Type Description
int

The zero-based index of the property. Returns a negative value if the property is not found.

Examples
ICustomDocumentPropertyCollection properties = workbook.CustomDocumentProperties;
properties.Add("Department", "Sales");
int index = properties.IndexOf("department");