ValueProviderResultExtensions.ConvertTo Method

Definition

Overloads

ConvertTo(ValueProviderResult, Type)

Attempts to convert the values in result to the specified type.

ConvertTo<T>(ValueProviderResult)

Attempts to convert the values in result to the specified type.

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

type
Type

The Type for conversion.

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

Returns

T

The converted value, or the default value of T if the value could not be converted.

Applies to