ModelStateDictionary.TryGetValue Method (String, ModelState)
.NET Framework (current version)
Attempts to gets the value that is associated with the specified key.
Assembly: System.Web (in System.Web.dll)
Public Function TryGetValue ( key As String, <OutAttribute> ByRef value As ModelState ) As Boolean
Parameters
- key
-
Type:
System.String
The key of the value to get.
- value
-
Type:
System.Web.ModelBinding.ModelState
When this method returns, contains the value that is associated with the specified key, if the key was found; otherwise, contains the default value for the type of this parameter. This parameter is passed uninitialized.
Return Value
Type: System.Booleantrue if the dictionary contains an item that has the specified key; otherwise, false.
.NET Framework
Available since 4.5
Available since 4.5
Show: