public void Test_SplitDecimal_0_12() { var options = new NumberToTextOptions { Currency = Currency.PLN }; Assert.Equal("zero zlotych dwanascie groszy", NumberToText.Convert(0.12M, options)); }
public void Test_SplitDecimal_50_50() { var options = new NumberToTextOptions { SplitDecimal = "i" }; Assert.Equal("piecdziesiat i piecdziesiat", NumberToText.Convert(50.50M, options)); }
private string CreateAmountInWords() { var options = new NumberToTextOptions { Stems = true, Currency = Currency.PLN }; return(NumberToText.Convert(Convert.ToDecimal(_grossSum, _culture), options)); }
public void Test_SplitDecimal_12_02() { var options = new NumberToTextOptions { Currency = Currency.PLN, SplitDecimal = " oraz " }; Assert.Equal("dwanascie zlotych oraz dwa grosze", NumberToText.Convert(12.02M, options)); }
public void Test_SplitDecimal_12_23() { var options = new NumberToTextOptions { Currency = Currency.PLN, SplitDecimal = "i" }; Assert.Equal("dwanascie zlotych i dwadziescia trzy grosze", NumberToText.Convert(12.23M, options)); }
public void Test_SplitDecimal_5_5() { var options = new NumberToTextOptions { Currency = Currency.PLN, SplitDecimal = "i" }; Assert.Equal("piec zlotych i piecdziesiat groszy", NumberToText.Convert(5.5M, options)); }
public object Evaluate(params object[] operands) { var options = new NumberToTextOptions { Stems = true, Currency = Currency.PLN, }; var kwotaStr = operands[0]; decimal kwota = Decimal.Parse(kwotaStr.ToString()); string res = NumberToText.Convert(kwota, options);; return(res); }
public DaneTabela RazemSlownie() { var sum = s_MListDt.First(); var nTto = new NumberToTextOptions { Currency = Currency.PLN, Stems = true }; var slowo = NumberToText.Convert(Convert.ToDecimal(sum.WartoscBrutto), nTto); return(new DaneTabela { Lewa = DictionaryMain.LabelSlownie, Prawa = slowo }); }
static void Main(string[] args) { //StreamReader sr = new StreamReader(@"C:\Users\Bartosz\Desktop\liczby.txt"); //string[] liczby = new string[2501]; //int i = 0; //do //{ // liczby[i] = sr.ReadLine(); // i++; //} //while (sr != null&&i<=2500); //do //{ // Console.WriteLine("podaj liczbe:"); // int a = int.Parse(Console.ReadLine()); // Console.WriteLine(liczby[a]); // Console.ReadKey(); //} //while (true); //sr.Close(); var options = new NumberToTextOptions { Stems = true, Currency = Currency.PLN, }; string wynik = NumberToText.Convert(2311, options); Console.WriteLine(wynik); Console.ReadLine(); }