HalfTypeParse Method (String, NumberStyles, IFormatProvider) |
Converts the string representation of a number to its System.Half equivalent
using the specified style and culture-specific format.
Namespace:
NeoAxis
Assembly:
NeoAxis.Core (in NeoAxis.Core.dll) Version: 2024.1.1.0 (2024.1.1.0)
Syntax public static HalfType Parse(
string value,
NumberStyles style,
IFormatProvider provider
)
Parameters
- value
- Type: SystemString
The string representation of the number to convert. - style
- Type: System.GlobalizationNumberStyles
A bitwise combination of System.Globalization.NumberStyles values that indicates
the style elements that can be present in value. A typical value to specify is
System.Globalization.NumberStyles.Number.
- provider
- Type: SystemIFormatProvider
An System.IFormatProvider object that supplies culture-specific information about the format of value.
Return Value
Type:
HalfTypeThe System.Half number equivalent to the number contained in s as specified by style and provider.
Exceptions Exception | Condition |
---|
ArgumentNullException | value is null. |
ArgumentException |
style is not a System.Globalization.NumberStyles value. -or- style is the
System.Globalization.NumberStyles.AllowHexSpecifier value.
|
FormatException | value is not in the correct format. |
OverflowException | value represents a number less than System.Half.MinValue or greater than System.Half.MaxValue. |
See Also