using System; using System.IO; public class TextSimpleTypes{ public static void Main(){ using(TextWriter tw = new StreamWriter("simple-types.txt")){ tw.Write(5); tw.WriteLine(); tw.Write(5.5); tw.WriteLine(); tw.Write(5555M); tw.WriteLine(); tw.Write(5==6); tw.WriteLine(); } using(TextWriter twnst = new StreamWriter("non-simple-types.txt")){ twnst.Write(new Point(1,2)); twnst.WriteLine(); twnst.Write(new Die(6)); twnst.WriteLine(); } } }