ValueProviderResultExtensions.ConvertTo 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.
Overloads
ConvertTo(ValueProviderResult, Type) |
Attempts to convert the values in |
ConvertTo<T>(ValueProviderResult) |
Attempts to convert the values in |
ConvertTo(ValueProviderResult, Type)
Attempts to convert the values in result
to the specified type.
public:
[System::Runtime::CompilerServices::Extension]
static System::Object ^ ConvertTo(Microsoft::AspNetCore::Mvc::ModelBinding::ValueProviderResult result, Type ^ type);
public static object ConvertTo (this Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult result, Type type);
static member ConvertTo : Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult * Type -> obj
<Extension()>
Public Function ConvertTo (result As ValueProviderResult, type As Type) As Object
Parameters
- result
- ValueProviderResult
The ValueProviderResult.
Returns
The converted value, or the default value of type
if the value could not be converted.
Applies to
ConvertTo<T>(ValueProviderResult)
Attempts to convert the values in result
to the specified type.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T ConvertTo(Microsoft::AspNetCore::Mvc::ModelBinding::ValueProviderResult result);
public static T ConvertTo<T> (this Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult result);
static member ConvertTo : Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult -> 'T
<Extension()>
Public Function ConvertTo(Of T) (result As ValueProviderResult) As T
Type Parameters
- T
The Type for conversion.
Parameters
- result
- ValueProviderResult
The ValueProviderResult.
Returns
The converted value, or the default value of T
if the value could not be converted.