ValueProviderResultExtensions Class

Extensions methods for Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.

Namespace
Microsoft.AspNetCore.Mvc.ModelBinding
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

public class ValueProviderResultExtensions
class Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResultExtensions

Methods

ConvertTo(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult, System.Type)

Attempts to convert the values in <em>result</em> to the specified type.

Arguments:
Return type:

System.Object

Returns:

The converted value, or the default value of <em>type</em> if the value could not be converted.

public static object ConvertTo(this ValueProviderResult result, Type type)
ConvertTo<T>(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult)

Attempts to convert the values in <em>result</em> to the specified type.

Arguments:result (Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult) – The Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.
Return type:T
Returns:The converted value, or the default value of <em>T</em> if the value could not be converted.
public static T ConvertTo<T>(this ValueProviderResult result)