IAFList.Item Property (Guid)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
AFObject this[ Guid id ] { get; }
ReadOnly Default Property Item ( id As Guid ) As AFObject Get Dim instance As IAFList Dim id As Guid Dim value As AFObject value = instance(id)
property AFObject^ default[Guid id] { AFObject^ get (Guid id); }
abstract Item : AFObject with get
Parameters
- id
- Type: SystemGuid
The id whose item to get.
Property Value
Type: AFObjectThe item with the specified id. If the specified id is not found, attempting to get it returns the default value for the item type T.
Remarks
The Item property is intended to be used to retrieve a specific object in the collection by the specified id. If you want to enumerate the collection, you can use the GetEnumerator property in the standard way. With Microsoft® Visual Basic® and C#, this property is automatically used within For Each In constructs. This property provides the ability to access a specified item in the collection by using the following syntax: myCollection[id].
If the id is not found, then this property returns the appropriate default value for the item type T; for example, zero (0) for integer types, for Boolean types, and for reference types.
If the collection has a lookup dictionary, the ids in the dictionary are compared with the specified id. If there is no lookup dictionary, the id of each item is first extracted and then compared with the specified id.
Retrieving the value of this property is an O(1) operation.