ConvertTo 方法 (ITypeDescriptorContext, CultureInfo, Object, Type)
Converts the given value object to the specified type. 不要直接在程式碼中參照此成員。其支援 SQL Server 基礎結構。
命名空間: Microsoft.SqlServer.Management.Sdk.Sfc
組件: Microsoft.SqlServer.Management.Sdk.Sfc (在 Microsoft.SqlServer.Management.Sdk.Sfc.dll 中)
語法
'宣告
Public Overrides Function ConvertTo ( _
context As ITypeDescriptorContext, _
culture As CultureInfo, _
value As Object, _
destinationType As Type _
) As Object
'用途
Dim instance As LocalizableEnumConverter
Dim context As ITypeDescriptorContext
Dim culture As CultureInfo
Dim value As Object
Dim destinationType As Type
Dim returnValue As Object
returnValue = instance.ConvertTo(context, _
culture, value, destinationType)
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
An ITypeDescriptorContext object that provides the context information.
- culture
型別:System.Globalization. . :: . .CultureInfo
A CultureInfo object to use as the current culture.
- value
型別:System. . :: . .Object
The Object to convert.
- destinationType
型別:System. . :: . .Type
The Type to convert the value parameter to.
傳回值
型別:System. . :: . .Object
An Object that represents the converted value.