Skip to content

Key Property

Description

Returns or sets a string that uniquely identifies a member in a collection.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property Key() As String

Remarks

If the string is not unique, an error will occur.

You can set the Key property when you use the Add method to add an object to a collection.

The value of the Index property of an object can change when objects in the collection are reordered, such as when you set the Sorted property to True. If you expect the Index property to change dynamically, refer to objects in a collection using the Key property.

See Also

TreeViewNode Object


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.