DateTimeValueSerializer.CanConvertFromString(String, IValueSerializerContext) 方法

定义

确定指定的 String 是否可以转换为 DateTime 的实例。Determines if the specified String can be convert to an instance of DateTime.

public:
 override bool CanConvertFromString(System::String ^ value, System::Windows::Markup::IValueSerializerContext ^ context);
public override bool CanConvertFromString (string value, System.Windows.Markup.IValueSerializerContext context);
override this.CanConvertFromString : string * System.Windows.Markup.IValueSerializerContext -> bool
Public Overrides Function CanConvertFromString (value As String, context As IValueSerializerContext) As Boolean

参数

value
String

要计算以进行转换的字符串。The string to evaluate for conversion.

context
IValueSerializerContext

用于转换的上下文信息。Context information that is used for conversion.

返回

Boolean

如果该值可以转换,则为 true;否则为 falsetrue if the value can be converted; otherwise, false.

注解

此实现始终返回 trueThis implementation always returns true.

适用于