Exemplo n.º 1
0
        public string ToNumericString()
        {
            var builder = new StringBuilder();

            Integers = Integers.TrimStart(Constants.ZeroCharacter);
            Decimals = Decimals.TrimEnd(Constants.ZeroCharacter);

            if (Digits.Length > 0)
            {
                if (IsNegative)
                {
                    builder.Append(Constants.NegationCharacter);
                }

                builder.Append(Integers);

                if (HasDecimal)
                {
                    builder.Append(Constants.DecimalCharacter);
                    builder.Append(Decimals);
                }
            }
            else
            {
                builder.Append(Constants.ZeroCharacter);
            }

            return(builder.ToString());
        }