NativeExcel2 for .Net Developer's Reference

INames.Item Property (Int32)

Returns a single IName interface from a Names collection using one-based index number.

[C#] In C#, this property is the indexer for the INames class.

[Visual Basic]
DefaultPropertyReadOnlyItem(_
ByValIndexAsInteger_
)AsIName
[C#]
INamethis[
intIndex
]{get;}
[C++]
__propertyIName*get_Item(
intIndex
);
[JScript]
returnValue = INamesObject.Item( Index );
-or-
returnValue = INamesObject( Index );

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Parameters

Index
The one-based index number of the IName interface.

Property Value

IName interface.

Example

This example returns the first defined name of the worksheet one.

[C#]
IName name;
name = Workbook.Worksheets[1].Names[1];   
[VisualBasic]
Dim name As IName
name = Workbook.Worksheets(1).Names(1)
[C++]
IName* name;
name = Workbook->Worksheets->Item[1]->Names->Item[1];   

See Also

INames Interface | NativeExcel Namespace | INames.Item Overload List | IWorksheet.Names property | IWorkbook.Names property | IName interface | IName.Index property