Ranglar va fon
{ Console.OutputEncoding = System.Text.Encoding.Unicode
Download 399.72 Kb.
|
4. Kiritish Chiqarish
{Console.OutputEncoding = System.Text.Encoding.Unicode;Console.WriteLine("The value 99999 in various formats:");Console.WriteLine("c format: {0:c}", 99999);Console.WriteLine("d9 format: {0:d9}", 99999);Console.WriteLine("f3 format: {0:f5}", 99999);Console.WriteLine("n format: {0:n}", 99999);Console.WriteLine("E format: {0:E}", 99999);Console.WriteLine("e format: {0:e3}", 99999);Console.WriteLine("X format: {0:X}", 99999);Console.WriteLine("x format: {0:x}", 99999);Console.WriteLine("g format: {0:g}", 99.999e+4);}Valyuta belgilaristatic void Main(string[] args){Console.OutputEncoding = System.Text.Encoding.Unicode;Console.WriteLine("Default: {0:c}", 12345);Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");Console.WriteLine("USA: {0:c}", 12345);Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");Console.WriteLine("France: {0:c}", 12345);Thread.CurrentThread.CurrentCulture = new CultureInfo("nl");Console.WriteLine("Netherlands: {0:c}", 12345);Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB");Console.WriteLine("Great Britain: {0:c}", 12345);Thread.CurrentThread.CurrentCulture = new CultureInfo("ja");Console.WriteLine("Japan: {0:c}", 12345);var culture = (CultureInfo)CultureInfo.CurrentCulture.Clone();culture.NumberFormat.CurrencySymbol = "#";Console.WriteLine("Japan custom: {0:c}", 12345);Console.WriteLine(string.Format(culture, "Japan custom: {0:c}", 12345));}Satr interpolyatsiyasiSintaksisi: { |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling