ViewDataDictionary.Remove Method

Definition

Overloads

Remove(KeyValuePair<String,Object>)

Removes the first occurrence of a specified object from the collection.

Remove(String)

Removes the element from the collection using the specified key.

Remove(KeyValuePair<String,Object>)

Removes the first occurrence of a specified object from the collection.

public bool Remove (System.Collections.Generic.KeyValuePair<string,object> item);
abstract member Remove : System.Collections.Generic.KeyValuePair<string, obj> -> bool
override this.Remove : System.Collections.Generic.KeyValuePair<string, obj> -> bool
Public Function Remove (item As KeyValuePair(Of String, Object)) As Boolean

Parameters

item
KeyValuePair<String,Object>

The object to remove from the collection.

Returns

true if item was successfully removed from the collection; otherwise, false. This method also returns false if item is not found in the collection.

Implements

Exceptions

The collection is read-only.

Applies to

Remove(String)

Removes the element from the collection using the specified key.

public bool Remove (string key);
abstract member Remove : string -> bool
override this.Remove : string -> bool
Public Function Remove (key As String) As Boolean

Parameters

key
String

The key of the element to remove.

Returns

true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original collection.

Implements

Exceptions

The collection is read-only.

key is null.

Applies to