CSharp examples for Language Basics:Data Type Cast
Converts various value types to string type
using System;//from w w w .ja va2s . com class StringConversion { static void Main(string[] args) { int i = 1975; float f = 53.123f; double d = 2345.7654; bool b = true; Console.WriteLine(i.ToString()); Console.WriteLine(f.ToString()); Console.WriteLine(d.ToString()); Console.WriteLine(b.ToString()); } }