// Token: 0x060001A4 RID: 420 RVA: 0x000084B8 File Offset: 0x000066B8
        private static string GetUnitValue(int number, bool isOrdinal)
        {
            if (!isOrdinal)
            {
                return(NorwegianBokmalNumberToWordsConverter.UnitsMap[number]);
            }
            string exceptionString;

            if (NorwegianBokmalNumberToWordsConverter.ExceptionNumbersToWords(number, out exceptionString))
            {
                return(exceptionString);
            }
            if (number < 13)
            {
                return(NorwegianBokmalNumberToWordsConverter.UnitsMap[number].TrimEnd(new char[]
                {
                    'e'
                }) + "ende");
            }
            return(NorwegianBokmalNumberToWordsConverter.UnitsMap[number] + "de");
        }
        // Token: 0x060001A3 RID: 419 RVA: 0x000081F0 File Offset: 0x000063F0
        private string Convert(int number, bool isOrdinal, GrammaticalGender gender)
        {
            if (number == 0)
            {
                return(NorwegianBokmalNumberToWordsConverter.GetUnitValue(0, isOrdinal));
            }
            if (number < 0)
            {
                return(string.Format("minus {0}", new object[]
                {
                    this.Convert(-number, isOrdinal, gender)
                }));
            }
            if (number == 1)
            {
                if (gender == GrammaticalGender.Feminine)
                {
                    return("ei");
                }
                if (gender == GrammaticalGender.Neuter)
                {
                    return("et");
                }
            }
            List <string> parts         = new List <string>();
            bool          millionOrMore = false;

            if (number / 1000000000 > 0)
            {
                millionOrMore = true;
                bool isExactOrdinal = isOrdinal && number % 1000000000 == 0;
                parts.Add(this.Part("{0} milliard" + (isExactOrdinal ? "" : "er"), (isExactOrdinal ? "" : "en ") + "milliard", number / 1000000000, !isExactOrdinal));
                number %= 1000000000;
            }
            if (number / 1000000 > 0)
            {
                millionOrMore = true;
                bool isExactOrdinal2 = isOrdinal && number % 1000000 == 0;
                parts.Add(this.Part("{0} million" + (isExactOrdinal2 ? "" : "er"), (isExactOrdinal2 ? "" : "en ") + "million", number / 1000000, !isExactOrdinal2));
                number %= 1000000;
            }
            bool thousand = false;

            if (number / 1000 > 0)
            {
                thousand = true;
                parts.Add(this.Part("{0}tusen", (number % 1000 < 100) ? "tusen" : "ettusen", number / 1000, false));
                number %= 1000;
            }
            bool hundred = false;

            if (number / 100 > 0)
            {
                hundred = true;
                parts.Add(this.Part("{0}hundre", (thousand || millionOrMore) ? "ethundre" : "hundre", number / 100, false));
                number %= 100;
            }
            if (number > 0)
            {
                if (parts.Count != 0)
                {
                    if (millionOrMore && !hundred && !thousand)
                    {
                        parts.Add("og ");
                    }
                    else
                    {
                        parts.Add("og");
                    }
                }
                if (number < 20)
                {
                    parts.Add(NorwegianBokmalNumberToWordsConverter.GetUnitValue(number, isOrdinal));
                }
                else
                {
                    string lastPart = NorwegianBokmalNumberToWordsConverter.TensMap[number / 10];
                    if (number % 10 > 0)
                    {
                        lastPart += string.Format("{0}", new object[]
                        {
                            NorwegianBokmalNumberToWordsConverter.GetUnitValue(number % 10, isOrdinal)
                        });
                    }
                    else if (isOrdinal)
                    {
                        lastPart = lastPart.TrimEnd(new char[]
                        {
                            'e'
                        }) + "ende";
                    }
                    parts.Add(lastPart);
                }
            }
            else if (isOrdinal)
            {
                List <string> list  = parts;
                int           index = parts.Count - 1;
                list[index] = list[index] + ((number == 0) ? "" : "en") + (millionOrMore ? "te" : "de");
            }
            return(string.Join("", parts.ToArray()).Trim());
        }