使用指定的上下文和区域性信息将指定的值对象转换为指定的类型。
命名空间: Microsoft.VisualStudio.TestTools.WebTesting
程序集: Microsoft.VisualStudio.QualityTools.WebTestFramework(在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)
语法
声明
Public Overrides Function ConvertTo ( _
context As ITypeDescriptorContext, _
culture As CultureInfo, _
value As Object, _
destinationType As Type _
) As Object
public override Object ConvertTo(
ITypeDescriptorContext context,
CultureInfo culture,
Object value,
Type destinationType
)
public:
virtual Object^ ConvertTo(
ITypeDescriptorContext^ context,
CultureInfo^ culture,
Object^ value,
Type^ destinationType
) override
abstract ConvertTo :
context:ITypeDescriptorContext *
culture:CultureInfo *
value:Object *
destinationType:Type -> Object
override ConvertTo :
context:ITypeDescriptorContext *
culture:CultureInfo *
value:Object *
destinationType:Type -> Object
public override function ConvertTo(
context : ITypeDescriptorContext,
culture : CultureInfo,
value : Object,
destinationType : Type
) : Object
参数
- context
类型:System.ComponentModel.ITypeDescriptorContext
ITypeDescriptorContext ,可提供格式上下文。
- culture
类型:System.Globalization.CultureInfo
作为当前区域性使用的 T:System.Globalization.CultureInfo。
- value
类型:System.Object
要转换的 Object。
- destinationType
类型:System.Type
要将 value 参数转换为的 Type。
返回值
类型:System.Object
表示转换的 value 的 Object。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。