Number Class

The basic numeric type. supports integer values as well as decimal values.

Definition

Namespace: Firefly.Box
Assembly: Firefly.Box (in Firefly.Box.dll) Version: debug-master-v:33791
C#
public abstract class Number : DataTypeBase, 
	IComparable
Inheritance
Object    DataTypeBase    Number
Derived
Implements
IComparable

Remarks

It has one important oddness, When divided by 0 – it'll return 0.

Properties

Methods

CastCasts the object specified in the basedOn parameter to a Number. If the cast fails an InvalidCastException is thrown
CompareToCompares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
(Overrides DataTypeBaseCompareTo(Object))
Create(Decimal) 
Create(Double) 
Create(Int16) 
Create(Int32) 
Create(Int64) 
Create(Single) 
EqualsDetermines whether the specified Object is equal to the current Object.
(Overrides ObjectEquals(Object))
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsNullOrZero 
IsSpecialNullInstance 
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Parse(String)Parses text and returns the parsed value as Number
Parse(String, String)Parses text and returns the parsed value as Number
ToDecimal Return the value as a Decimal
ToStringReturns a String that represents the current Number.
(Overrides ObjectToString)
ToString(String)Returns a String that represents the current Number. The result string is formatted using the format provided in the format parameter.
(Overrides DataTypeBaseToString(String))
ToString(String, IFormatProvider)Returns a String that represents the value specified in format. The result string is formatted using the format provided in the format parameter.
(Inherited from DataTypeBase)
TryCastTries to cast the object specified in the basedOn parameter to a Boolean.

Operators

Extension Methods

ShouldBeVerifies that the actual value matches the expected value
(Defined by Should)
ShouldBeVerifies that the actual value matches the expected value
(Defined by Should)
ShouldBeVerifies that the actual value matches the expected value
(Defined by Should)
ShouldBeVerifies that the actual value matches the expected value
(Defined by Should)
ShouldBeVerifies that the actual value matches the expected value
(Defined by Should)

See Also