DataSourceIDConverter.ConvertFrom Method

Definition

Converts the specified object to the native type of the converter.

C#
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value);

Parameters

context
ITypeDescriptorContext

An object implementing the ITypeDescriptorContext that provides information about a context to a type converter so that the type converter can perform a conversion.

culture
CultureInfo

A CultureInfo object that specifies the culture of the value parameter.

value
Object

The object to convert.

Returns

The value parameter is returned as a string.

Exceptions

value is other than a string or null.

Remarks

If the value parameter has a type of string, it is returned as a string. If value is null, an empty string ("") is returned. Otherwise, a NotSupportedException is thrown.

The ConvertFrom method does not use the context or culture parameter.

Applies to

Продукт Версії
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also