Export (0) Print
Expand All

JsonObject.Remove Method

Removes the key/value pair with a specified key from the JSON CLR object type.

Namespace:  System.Json
Assembly:  System.Json (in System.Json.dll)

public bool Remove(
	string key
)

Parameters

key
Type: System.String
The key of the item to remove.

Return Value

Type: System.Boolean
true if the element is successfully found and removed; otherwise, false. This method returns false if key is not found in the JSON CLR object.

Implements

IDictionary<TKey, TValue>.Remove(TKey)

ExceptionCondition
ArgumentNullException

key is null.

If the JsonObject does not contain an element with the specified key, the JsonObject remains unchanged. No exception is thrown.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft