|
RationalTryParse Method (String, NumberStyles, IFormatProvider, Rational)
|
Converts the string representation of a number to its
Rational representation. A return value indicates whether the conversion succeeded or failed.
Namespace:
Accord.Math
Assembly:
Accord (in Accord.dll) Version: 3.8.0
Syntax public static bool TryParse(
string s,
NumberStyles style,
IFormatProvider provider,
out Rational result
)
Public Shared Function TryParse (
s As String,
style As NumberStyles,
provider As IFormatProvider,
<OutAttribute> ByRef result As Rational
) As Boolean
Request Example
View SourceParameters
- s
- Type: SystemString
A string that represents a number. - style
- Type: System.GlobalizationNumberStyles
Indicates the styles that can be present when parsing a number. - provider
- Type: SystemIFormatProvider
An object that supplies culture-specific information about the format of s. - result
- Type: Accord.MathRational
When this method returns, contains the parsed Rational value.
Return Value
Type:
BooleanTrue if the conversion succeeded; otherwise false.
See Also