Share via


ModelStateDictionary.Remove Method (KeyValuePair<String, ModelState>)

Removes the first occurrence of the specified item from the model-state dictionary.

Namespace:  System.Web.WebPages.Html
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

Syntax

'Declaration
Public Function Remove ( _
    item As KeyValuePair(Of String, ModelState) _
) As Boolean
'Usage
Dim instance As ModelStateDictionary 
Dim item As KeyValuePair(Of String, ModelState)
Dim returnValue As Boolean 

returnValue = instance.Remove(item)
public bool Remove(
    KeyValuePair<string, ModelState> item
)
public:
virtual bool Remove(
    KeyValuePair<String^, ModelState^> item
) sealed
abstract Remove : 
        item:KeyValuePair<string, ModelState> -> bool  
override Remove : 
        item:KeyValuePair<string, ModelState> -> bool
public final function Remove(
    item : KeyValuePair<String, ModelState>
) : boolean

Parameters

Return Value

Type: System.Boolean
true if the item was successfully removed from the model-state dictionary; false if the item was not removed or if the item does not exist in the model-state dictionary.

Implements

ICollection<T>.Remove(T)

See Also

Reference

ModelStateDictionary Class

Remove Overload

System.Web.WebPages.Html Namespace