Dela via


InputBase<TValue>.TryParseValueFromString(String, T, String) Method

Definition

Parses a string to create an instance of T. Derived classes can override this to change how CurrentValueAsString interprets incoming values.

protected:
 abstract bool TryParseValueFromString(System::String ^ value, [Runtime::InteropServices::Out] T % result, [Runtime::InteropServices::Out] System::String ^ % validationErrorMessage);
protected abstract bool TryParseValueFromString (string value, out T result, out string validationErrorMessage);
abstract member TryParseValueFromString : string *  *  -> bool
Protected MustOverride Function TryParseValueFromString (value As String, ByRef result As T, ByRef validationErrorMessage As String) As Boolean

Parameters

value
String

The string value to be parsed.

result
T

An instance of T.

validationErrorMessage
String

If the value could not be parsed, provides a validation error message.

Returns

True if the value could be parsed; otherwise false.

Applies to