Click or drag to resize

HalfTypeTryParse(String, NumberStyles, IFormatProvider, HalfType) Method

Converts the string representation of a number to its System.Half equivalent using the specified style and culture-specific format. A return value indicates whether the conversion succeeded or failed.

Namespace: NeoAxis
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.1.1.0 (2026.1.1.0)
Syntax
C#
public static bool TryParse(
	string value,
	NumberStyles style,
	IFormatProvider provider,
	out HalfType result
)

Parameters

value  String
The string representation of the number to convert.
style  NumberStyles
A bitwise combination of System.Globalization.NumberStyles values that indicates the permitted format of value. A typical value to specify is System.Globalization.NumberStyles.Number.
provider  IFormatProvider
An System.IFormatProvider object that supplies culture-specific parsing information about value.
result  HalfType
When this method returns, contains the System.Half number that is equivalent to the numeric value contained in value, if the conversion succeeded, or is zero if the conversion failed. The conversion fails if the s parameter is null, is not in a format compliant with style, or represents a number less than System.Half.MinValue or greater than System.Half.MaxValue. This parameter is passed uninitialized.

Return Value

Boolean
true if s was converted successfully; otherwise, false.
Exceptions
ExceptionCondition
ArgumentException style is not a System.Globalization.NumberStyles value. -or- style is the System.Globalization.NumberStyles.AllowHexSpecifier value.
See Also