ValueSerializer.ConvertFromString(String, IValueSerializerContext) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru