IPropertyCollection.Item property

Stores, alters, or accesses properties.

Namespace:  Microsoft.Office.Server.Search.Query
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)

Syntax

'Declaration
Default Property Item ( _
    key As String _
) As Object
    Get
    Set
'Usage
Dim instance As IPropertyCollection
Dim key As String
Dim value As Object

value = instance(key)

instance(key) = value
Object this[
    string key
] { get; set; }

Parameters

  • key
    Type: System.String

    The 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]

If key is null or empty.

[!:ArgumentException]

If value is of an unsupported type. You can check if a type is supported by using IsSupported(Type).

KeyNotFoundException

If a property with the specified key is not found on QueryProperties.

[!:FieldAccessException]

If the property being set has an internal/private setter.

Remarks

Every property available on the class via property syntax, such as Properties.QueryText, also will be available via this accessor (for example, Properties["QueryTest"].

See also

Reference

IPropertyCollection interface

IPropertyCollection members

Microsoft.Office.Server.Search.Query namespace