PISystems.Item Property (String)
- Last UpdatedSep 18, 2024
- PI System
- AF SDK 2024
- Developer
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.0.1156
Syntax
public PISystem this[ string name ] { get; }
Public ReadOnly Default Property Item ( name As String ) As PISystem Get Dim instance As PISystems Dim name As String Dim value As PISystem value = instance(name)
public: property PISystem^ default[String^ name] { PISystem^ get (String^ name); }
member Item : PISystem with get
Parameters
- name
- Type: System.String
Specifies the collection member by name. It must be equal to the Name property of a member of the collection.
Property Value
Type: PISystemThe item with the specified name. If the specified name is not found, attempting to get it returns the default value for the item type T.
Exceptions
Exception | Condition |
---|---|
IndexOutOfRangeException | Thrown when the specified index is out of range. |
Remarks
The Item property is intended to be used to retrieve a specific object in the collection by the specified name. 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[name].
If the name is not found, then this property returns the appropriate default value for the item type T; for example, zero (0) for integer types, false for Boolean types, and null for reference types.
Retrieving the value of this property is an O(1) operation.
![]() |
---|
Only the AFElements and AFAttributes collections support looking up items in the collection by name and path. All other collections only support looking up items by name. |