[This is preliminary documentation and is subject to change.]
Represents a floating point literal token in a source text.
Declaration Syntax
C# |
public class FloatingToken : Token
Members
All Members | Methods | Properties | |||
Icon | Member | Description |
---|---|---|
DecimalValue |
Gets the value of this literal token as a decimal value.
(Overrides Token.DecimalValue.) | |
Equals(Object) | (Inherited from Object.) | |
Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
FloatingValue |
Gets the value of this token as a floating point number.
(Overrides Token.FloatingValue.) | |
GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
HasDecimalValue |
Gets a value indicating whether the literal parsed correctly as
a Decimal value.
(Overrides Token.HasDecimalValue.) | |
IntegerValue |
Gets the value of this number as an integer number.
(Overrides Token.IntegerValue.) | |
MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
Section | Gets the Section denoting the range of characters
corresponding to this token in the source text. (Inherited from Token.) | |
SetPattern(String) | Sets a new regular expression pattern for matching floating point
literals. | |
ToString()()()() |
Creates a short string representation of the value of this token.
(Overrides Object.ToString()()()().) | |
Value |
Gets the value of this literal token as a floating point (double) value.
|
Remarks
The literal can represent any value compatible with the Double type, and the format can be any which is accepted by the Double.TryParse method. The literal is also parsed as a Decimal type. If this succeeds, then HasDecimalValue will return true, and DecimalValue will return the value.