ValueProviderResultExtensions.ConvertTo 方法     
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| ConvertTo(ValueProviderResult, Type) | 尝试将 中的  | 
| ConvertTo<T>(ValueProviderResult) | 尝试将 中的  | 
ConvertTo(ValueProviderResult, Type)
尝试将 中的 result 值转换为指定的类型。
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参数
返回
转换后的值,如果无法转换该值,则为 的默认值 type 。
适用于
ConvertTo<T>(ValueProviderResult)
尝试将 中的 result 值转换为指定的类型。
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类型参数
- T
Type要转换的 。
参数
返回
		T
		
	
	转换后的值,如果无法转换该值,则为 的默认值 T 。