Επεξεργασία

Κοινή χρήση μέσω


ValueSerializer.ConvertFromString(String, IValueSerializerContext) Method

Definition

When overridden in a derived class, converts a String to an instance of the type that the implementation of ValueSerializer supports.

public:
 virtual System::Object ^ ConvertFromString(System::String ^ value, System::Windows::Markup::IValueSerializerContext ^ context);
public virtual object ConvertFromString (string value, System.Windows.Markup.IValueSerializerContext context);
abstract member ConvertFromString : string * System.Windows.Markup.IValueSerializerContext -> obj
override this.ConvertFromString : string * System.Windows.Markup.IValueSerializerContext -> obj
Public Overridable Function ConvertFromString (value As String, context As IValueSerializerContext) As Object

Parameters

value
String

The string to convert.

context
IValueSerializerContext

Context information that is used for conversion.

Returns

A new instance of the type that the implementation of ValueSerializer supports based on the supplied value.

Exceptions

value cannot be converted.

Remarks

The base implementation always throws an exception.

Notes to Inheritors

Avoid throwing exceptions from implementations. See ValueSerializer.

Applies to