ModelStateDictionary.TryGetValue(String, ModelState) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the model-state value that is associated with the specified key.
public bool TryGetValue (string key, out System.Web.WebPages.Html.ModelState value);
abstract member TryGetValue : string * ModelState -> bool
override this.TryGetValue : string * ModelState -> bool
Public Function TryGetValue (key As String, ByRef value As ModelState) As Boolean
Parameters
- key
- String
The key to get the value of.
- value
- ModelState
When this method returns, if the key is found, contains the model-state value that is associated with the specified key; otherwise, contains the default value for the ModelState type. This parameter is passed uninitialized.
Returns
true if the model-state dictionary contains an element that has the specified key; otherwise, false.