コード例 #1
0
        public string ConvertToWords(double number, IConversionOptions options = null)
        {
            var dictionary             = new EnglishDictionary();
            var groupsToWordsConverter = new EnglishTripletToWordsConverter(dictionary);

            var converter = new NumberToWordsConverterBuilder()
                            .WithDictionary(dictionary)
                            .WithTripletConverter(groupsToWordsConverter)
                            .Build();

            return(converter.ConvertToWords(number, options));
        }
コード例 #2
0
 public EnglishTripletToWordsConverter(EnglishDictionary dictionary)
 {
     _dictionary = dictionary;
 }