InstanceAnnotationCollection.TryGetValue Method
Gets the value associated with the specified key.
Namespace: Microsoft.Data.OData
Assembly: Microsoft.Data.OData (in Microsoft.Data.OData.dll)
Syntax
'Declaration
Public Function TryGetValue ( _
key As String, _
<OutAttribute> ByRef value As ODataValue _
) As Boolean
'Usage
Dim instance As InstanceAnnotationCollection
Dim key As String
Dim value As ODataValue
Dim returnValue As Boolean
returnValue = instance.TryGetValue(key, _
value)
public bool TryGetValue(
string key,
out ODataValue value
)
public:
bool TryGetValue(
String^ key,
[OutAttribute] ODataValue^% value
)
member TryGetValue :
key:string *
value:ODataValue byref -> bool
public function TryGetValue(
key : String,
value : ODataValue
) : boolean
Parameters
- key
Type: System.String
The key whose value to get.
- value
Type: Microsoft.Data.OData.ODataValue%
When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
Return Value
Type: System.Boolean
true if the object that implements ICollection<T> contains an element with the specified key; otherwise, false.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | key is null. |