Format int value
In this chapter you will learn:
Use CultureInfo in int.ToString method
using System;//from j a v a2s . co m
using System.Globalization;
public class NumParsingApp {
public static void Main(string[] args) {
int k = 12345;
CultureInfo us = new CultureInfo("en-US");
string v = k.ToString("c", us);
Console.WriteLine(v);
}
}
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Byte, Integer, Long