ModelStateDictionary.Remove Method (String)

Removes the element that has the specified key from the model-state dictionary.

Namespace:  System.Web.Http.ModelBinding
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Public Function Remove ( _
    key As String _
) As Boolean
'Usage
Dim instance As ModelStateDictionary
Dim key As String
Dim returnValue As Boolean

returnValue = instance.Remove(key)
public bool Remove(
    string key
)
public:
virtual bool Remove(
    String^ key
) sealed
abstract Remove : 
        key:string -> bool 
override Remove : 
        key:string -> bool 
public final function Remove(
    key : String
) : boolean

Parameters

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 model-state dictionary.

Implements

IDictionary<TKey, TValue>.Remove(TKey)

See Also

Reference

ModelStateDictionary Class

Remove Overload

System.Web.Http.ModelBinding Namespace