In this article we will she how we can convert the number or decimal number or currency into words using C#.net. In this article we will cover below topics:
- Convert decimal number to words in c#.net
- Convert Numbers To Words In C#
- Convert Numeric Value Into Words (Currency) In C#
- Convert number with decimals (in currency) to words
- C# Number (Decimal) to word converter in Dollar
So for this first we you need a c# library to convert the decimal into words using c#.net in console application. You can download the library code from here. You just need to include this code into your application.
Download
Now we will prepare a console application and add the below code.
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using Aspdotnetpools.DecimalToWordExtension; namespace ConsoleApp1 { class Program { static void Main(string[] args) { decimal val =Convert.ToDecimal(1000000.456); Console.WriteLine(DecimalToWordExtension.ToWords(val)); Console.ReadLine(); } } }
|
In above code I have added the included Aspdotnetpools.DecimalToWordExtension into the project and then converted the word. Here is the output.
0 comments:
Please let me know your view