try_parse method

try_parse

Converts the string representation of a size to its class equivalent. A return value indicates whether the conversion is succeeded or failed.

Returns

true if s is converted successfully; otherwise, false.

def try_parse(self, s, size):
    ...
Parameter Type Description
s System.String A string containing a size to convert.
size any When the method returns, it contains the instance of Size class
that is equivalent to the value specified in s parameter, if the conversion is succeeded; otherwise, null.

See Also