Bridge

Int16..::..TryParse Method (String, Int16%)

Converts the string representation of a number to its 16-bit signed integer equivalent. A return value indicates whether the conversion succeeded or failed.

Namespace:  System
Assembly:  Bridge (in Bridge.dll)

Syntax


[TemplateAttribute]
public static bool TryParse(
	string s,
	out short result
)
<TemplateAttribute> _
Public Shared Function TryParse ( _
	s As String, _
	<OutAttribute> ByRef result As Short _
) As Boolean
[TemplateAttribute]
public:
static bool^ TryParse(
	String^ s, 
	[OutAttribute] short^% result
)

Parameters

s
Type: System..::..String
A string containing a number to convert.
result
Type: System..::..Int16%
When this method returns, contains the 16-bit signed integer value equivalent to the number contained in s, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is null or Empty, is not of the correct format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.

Return Value

true if s was converted successfully; otherwise, false.