DateTimeValueSerializer.ConvertFromString 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.
public:
override System::Object ^ ConvertFromString(System::String ^ value, System::Windows::Markup::IValueSerializerContext ^ context);
public override object ConvertFromString (string value, System.Windows.Markup.IValueSerializerContext context);
override this.ConvertFromString : string * System.Windows.Markup.IValueSerializerContext -> obj
Public Overrides Function ConvertFromString (value As String, context As IValueSerializerContext) As Object
Parameters
- context
- IValueSerializerContext
Context information that is used for conversion.
Returns
A new instance of DateTime based on the supplied value
.
Exceptions
value
is null
.
Remarks
An empty string returns DateTime.MinValue.
The current implementation uses Parse internally, and also uses the following DateTimeStyles: DateTimeStyles.RoundtripKind | DateTimeStyles.NoCurrentDateDefault | DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite
.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor