# NumberFragment class

Namespace: [Grasshopper2.Parsing](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.parsing.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class NumberFragment : Fragment
```

A numeric literal. Leading signs and trailing unit suffixes are not part of a number; they are separate fragments, because neither can be classified without knowing the grammar.

## Properties

- [Fractional](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/fractional.md): Gets the value of this literal. Always populated and always safe to read. A double carries 53 bits of mantissa, so for digit runs beyond sixteen digits this is the nearest representable value rather than the exact one; [NumberFragment.Integral](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/integral.md) is exact whenever [NumberFragment.IsIntegral](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/isintegral.md) is true.
- [Integral](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/integral.md): Gets the exact value of this literal. Only meaningful when [NumberFragment.IsIntegral](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/isintegral.md) is true.
- [IsFractional](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/isfractional.md): Gets whether this literal was written as something other than a plain digit run, and must therefore be read through [NumberFragment.Fractional](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/fractional.md).
- [IsIntegral](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/isintegral.md): Gets whether [NumberFragment.Integral](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/integral.md) is the complete truth of this literal. This is a question about how the number was written rather than about its value, so "4.0" is not integral even though four is a whole number.
- [Kind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/kind.md): Gets the category of this fragment.
- [Notation](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/notation.md): Gets the notations used to write this literal.
- [SignificantDecimals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.numberfragment/significantdecimals.md): Gets the number of digits written between the decimal separator and the end of the mantissa. This is a purely lexical count, which is what makes "0.0" distinguishable from "0.000". Digit group underscores are not counted, and a literal without a separator has a scale of zero.

## Inherited Members

- From [Fragment](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment.md): [After](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/after.md), [Defect](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/defect.md), [Length](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/length.md), [Next](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/next.md), [NextMeaningful](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/nextmeaningful.md), [Prev](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/prev.md), [PrevMeaningful](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/prevmeaningful.md), [Start](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/start.md), [Text](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/text.md), [IsAdjacentTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/isadjacentto.md), [IsAll](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/isall.md), [IsAny](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/isany.md), [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parsing.fragment/tostring.md)
