Share via


InputSelect<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:
 override bool TryParseValueFromString(System::String ^ value, [Runtime::InteropServices::Out] T % result, [Runtime::InteropServices::Out] System::String ^ % validationErrorMessage);
protected override bool TryParseValueFromString (string value, out T result, out string validationErrorMessage);
override this.TryParseValueFromString : string *  *  -> bool
Protected Overrides 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