- Katılım
- 29 Mayıs 2019
- Mesajlar
- 8,562
- Tepkime puanı
- 2
Ekrana yazdırılan ifadeleri özel formatlar kullanarak daha okunabilir ve daha anlamlı bir hale getirebiliriz.
Kod:
[/SIZE][/COLOR][/FONT][FONT=Courier New][COLOR=Black][SIZE=4][FONT=Courier New][COLOR=Black][SIZE=4]Console.WriteLine("{0:yy}",DateTime.Now); Console.ReadKey();[/SIZE][/COLOR][/FONT]
Kod:
[/SIZE][/COLOR][/FONT][FONT=Courier New][COLOR=Black][SIZE=4][FONT=Courier New][COLOR=Black][SIZE=4]Console.WriteLine("ara beni{0:(###) ### ## ##}",53821234567); Console.ReadKey();[/SIZE][/COLOR][/FONT]
Kod:
[/SIZE][/COLOR][/FONT][FONT=Courier New][COLOR=Black][SIZE=4][FONT=Courier New][COLOR=Black][SIZE=4]int x; Console.Write("Dönüştürülücek Sayıyı giriniz:"); x = Convert.ToInt16(Console.ReadLine()); Console.WriteLine("Sayı..:{0:N}", x); Console.WriteLine("Para..:{0:C}", x); Console.WriteLine("Ondalık..:{0:D5}", x); Console.WriteLine("Ondalık2..:{0:D10}", x); Console.WriteLine("Bilimsel{0:E}", x); Console.WriteLine("Sabit Nokta..:{0:F0}", x); Console.WriteLine("Sabit Nokta2..:{0:F2}", x); Console.WriteLine("Sabit Nokta3..:{0:F5}", x); Console.WriteLine("Onaltılık..:{0:X}", x); Console.ReadKey();[/SIZE][/COLOR][/FONT]