DataSourceIDConverter.ConvertFrom Metod

Definition

Konverterar det angivna objektet till konverterarens interna typ.

public:
 override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value);
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object

Parametrar

context
ITypeDescriptorContext

Ett objekt som implementerar ITypeDescriptorContext som innehåller information om en kontext till en typkonverterare så att typkonverteraren kan utföra en konvertering.

culture
CultureInfo

Ett CultureInfo objekt som anger parameterns value kultur.

value
Object

Objektet som ska konverteras.

Returer

Parametern value returneras som en sträng.

Undantag

value är annat än en sträng eller null.

Kommentarer

Om parametern value har en typ av sträng returneras den som en sträng. Om value är nullreturneras en tom sträng (""). Annars utlöses en NotSupportedException.

Metoden ConvertFrom använder inte parametern context eller culture .

Gäller för

Se även