Click or drag to resize
Int16Parse Method (String, IFormatProvider)
Converts the string representation of a number in a specified culture-specific format to its 16-bit signed integer equivalent.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static short Parse(
	string s,
	IFormatProvider provider
)

Parameters

s
Type: SystemString
A string containing a number to convert.
provider
Type: SystemIFormatProvider
An IFormatProvider that supplies culture-specific formatting information about s.

Return Value

Type: Int16
A 16-bit signed integer equivalent to the number specified in s.
Exceptions
ExceptionCondition
ArgumentNullExceptions is null.
FormatExceptions is not in the correct format.
OverflowExceptions represents a number less than MinValue or greater than MaxValue.
See Also