InstanceAnnotationCollection.Remove Method
Removes the element with the specified key from the ICollection<T>.
Namespace: Microsoft.Data.OData
Assembly: Microsoft.Data.OData (in Microsoft.Data.OData.dll)
Syntax
'Declaration
Public Function Remove ( _
key As String _
) As Boolean
'Usage
Dim instance As InstanceAnnotationCollection
Dim key As String
Dim returnValue As Boolean
returnValue = instance.Remove(key)
public bool Remove(
string key
)
public:
bool Remove(
String^ key
)
member Remove :
key:string -> bool
public function Remove(
key : String
) : boolean
Parameters
- key
Type: System.String
The key of the element to remove.
Return Value
Type: System.Boolean
true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original ICollection<T>.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | key is null. |
| NotSupportedException | The ICollection<T> is read-only. |