Operator Explicit
Explicit(String to BigRational)
Defines an explicit conversion of a System.String object to a BigRational value.
Declaration
public static explicit operator BigRational(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The value to convert to a BigRational. |
Returns
Type | Description |
---|---|
BigRational | A BigRational number that is equivalent to the number specified in the value parameter. |
Remarks
Shortcut for Parse
allows simple syntax like:
var x = (BigRational)"1.23'456e+1000";
Explicit(BigRational to Byte)
Defines an explicit conversion of a BigRational number to a System.Byte value.
Declaration
public static explicit operator byte (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Byte. |
Returns
Type | Description |
---|---|
System.Byte | The value of the current instance, converted to an System.Byte. |
Explicit(BigRational to SByte)
Defines an explicit conversion of a BigRational number to a System.SByte value.
Declaration
public static explicit operator sbyte (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.SByte. |
Returns
Type | Description |
---|---|
System.SByte | The value of the current instance, converted to an System.SByte. |
Explicit(BigRational to Int16)
Defines an explicit conversion of a BigRational number to a System.Int16 value.
Declaration
public static explicit operator short (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Int16. |
Returns
Type | Description |
---|---|
System.Int16 | The value of the current instance, converted to an System.Int16. |
Explicit(BigRational to UInt16)
Defines an explicit conversion of a BigRational number to a System.UInt16 value.
Declaration
public static explicit operator ushort (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.UInt16. |
Returns
Type | Description |
---|---|
System.UInt16 | The value of the current instance, converted to an System.UInt16. |
Explicit(BigRational to Char)
Defines an explicit conversion of a BigRational number to a System.Char value.
Declaration
public static explicit operator char (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Char. |
Returns
Type | Description |
---|---|
System.Char | The value of the current instance, converted to an System.Char. |
Explicit(BigRational to Int32)
Defines an explicit conversion of a BigRational number to a System.Int32 value.
Declaration
public static explicit operator int (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Int32. |
Returns
Type | Description |
---|---|
System.Int32 | The value of the current instance, converted to an System.Int32. |
Explicit(BigRational to UInt32)
Defines an explicit conversion of a BigRational number to a System.UInt32 value.
Declaration
public static explicit operator uint (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.UInt32. |
Returns
Type | Description |
---|---|
System.UInt32 | The value of the current instance, converted to an System.UInt32. |
Explicit(BigRational to Int64)
Defines an explicit conversion of a BigRational number to a System.Int64 value.
Declaration
public static explicit operator long (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Int64. |
Returns
Type | Description |
---|---|
System.Int64 | The value of the current instance, converted to an System.Int64. |
Explicit(BigRational to UInt64)
Defines an explicit conversion of a BigRational number to a System.UInt64 value.
Declaration
public static explicit operator ulong (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.UInt64. |
Returns
Type | Description |
---|---|
System.UInt64 | The value of the current instance, converted to an System.UInt64. |
Explicit(BigRational to IntPtr)
Defines an explicit conversion of a BigRational number to a System.IntPtr value.
Declaration
public static explicit operator IntPtr(BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.IntPtr. |
Returns
Type | Description |
---|---|
System.IntPtr | The value of the current instance, converted to an System.IntPtr. |
Explicit(BigRational to UIntPtr)
Defines an explicit conversion of a BigRational number to a System.UIntPtr value.
Declaration
public static explicit operator UIntPtr(BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.UIntPtr. |
Returns
Type | Description |
---|---|
System.UIntPtr | The value of the current instance, converted to an System.UIntPtr. |
Explicit(BigRational to Half)
Defines an explicit conversion of a BigRational number to a System.Half value.
Declaration
public static explicit operator Half(BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Half. |
Returns
Type | Description |
---|---|
System.Half | The value of the current instance, converted to an System.Half. |
Explicit(BigRational to Single)
Defines an explicit conversion of a BigRational number to a System.Single value.
Declaration
public static explicit operator float (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Single. |
Returns
Type | Description |
---|---|
System.Single | The value of the current instance, converted to an System.Single. |
Explicit(BigRational to Double)
Defines an explicit conversion of a BigRational number to a System.Double value.
Declaration
public static explicit operator double (BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Double. |
Returns
Type | Description |
---|---|
System.Double | The value of the current instance, converted to an System.Double. |
Explicit(BigRational to Decimal)
Defines an explicit conversion of a BigRational number to a System.Decimal value.
Declaration
public static explicit operator Decimal(BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Decimal. |
Returns
Type | Description |
---|---|
System.Decimal | The value of the current instance, converted to an System.Decimal. |
Explicit(BigRational to BigInteger)
Defines an explicit conversion of a BigRational number to a System.Numerics.BigInteger value.
Declaration
public static explicit operator BigInteger(BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Numerics.BigInteger. |
Returns
Type | Description |
---|---|
System.Numerics.BigInteger | The value of the current instance, converted to an System.Numerics.BigInteger. |
Remarks
The result is truncated to integer by default.
Consider rounding the value before using Round(BigRational), Round(BigRational, Int32) or Round(BigRational, Int32, MidpointRounding) methods.
Explicit(BigRational to ReadOnlySpan<UInt32>)
Defines an explicit access to the internal data representation of a BigRational number.
Declaration
public static explicit operator ReadOnlySpan<uint>(BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | A BigRational number. |
Returns
Type | Description |
---|---|
System.ReadOnlySpan<System.UInt32> |
Explicit(BigRational to Int128)
Defines an explicit conversion of a BigRational number to a System.Int128 value.
Declaration
public static explicit operator Int128(BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Int128. |
Returns
Type | Description |
---|---|
System.Int128 | The value of the current instance, converted to an System.Int128. |
Explicit(BigRational to UInt128)
Defines an explicit conversion of a BigRational number to a System.UInt128 value.
Declaration
public static explicit operator UInt128(BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.UInt128. |
Returns
Type | Description |
---|---|
System.UInt128 | The value of the current instance, converted to an System.UInt128. |
Explicit(BigRational to NFloat)
Defines an explicit conversion of a BigRational number to a System.Runtime.InteropServices.NFloat value.
Declaration
public static explicit operator NFloat(BigRational value)
Parameters
Type | Name | Description |
---|---|---|
BigRational | value | The value to convert to a System.Runtime.InteropServices.NFloat. |
Returns
Type | Description |
---|---|
System.Runtime.InteropServices.NFloat | The value of the current instance, converted to an System.Runtime.InteropServices.NFloat. |