IReadOnlyPropertyCollection.Item property
Gets a string value that stores, alters, or accesses properties.
Namespace: Microsoft.SharePoint.Search.Query
Assembly: Microsoft.SharePoint.Search (in Microsoft.SharePoint.Search.dll)
Syntax
'Declaration
ReadOnly Default Property Item ( _
key As String _
) As Object
Get
'Usage
Dim instance As IReadOnlyPropertyCollection
Dim key As String
Dim value As Object
value = instance(key)
Object this[
string key
] { get; }
Parameters
key
Type: System.StringThe key of the property to access. It is case insensitive.
Property value
Type: System.Object
The value for the requested property as an object reference. It will have the same underlying type of the value that was stored in the property in the first place.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The key is null or empty. |
KeyNotFoundException | The property with the specified key is not found in the IReadOnlyPropertyCollection property. |
FieldAccessException | The property being set has an internal/private setter. |
Remarks
Every property available on the class via property syntax, such as Properties.QueryText, will also be available via the accessor (for example, Properties["QueryText"]).
See also
Reference
IReadOnlyPropertyCollection interface