Item Property
Gets or sets the value associated with the specified key.
Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Overrides Property Item ( _
key As Object _
) As Object
'Usage
Dim instance As WeaklyTypedPropertyDictionary
Dim key As Object
Dim value As Object
value = instance.Item(key)
instance.Item(key) = value
public override Object Item[
Object key
] { get; set; }
public:
virtual property Object^ Item[Object^ key] {
Object^ get (Object^ key) override;
void set (Object^ key, Object^ value) override;
}
JScript does not support indexed properties.
Parameters
- key
Type: System..::.Object
The key of the value to get.
Property Value
Type: System..::.Object
The value associated with the specified key, or a nullNothingnullptra null reference (Nothing in Visual Basic) reference (Nothing in Visual Basic) if key is not in the dictionary.
Implements
IDictionary..::.Item[([(Object])])
Exceptions
Exception | Condition |
---|---|
PropertyConflictException | The key name provided conflicts with a strongly-typed property name. |
Remarks
Override of Hashtable.Item that provides validation of key names (ensuring that they do not conflict with reserved orders sub-system names).
To support legacy Commerce Server functionality, weakly-typed property names starting with "_" (underscore) will not be written to storage.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
WeaklyTypedPropertyDictionary Class