Beispiel #1
0
        public void Bills03()
        {
            // When im writing in the bills text
            StreamWriter yc;

            try
            {
                yc = File.AppendText("C:\\Users\\RON TAYLOR\\Desktop\\Computer Programing\\Bills.txt");


                yc.WriteLine(total_charges);
                yc.WriteLine("Total charges{0}:", total_charges);
                yc.Close();
            }
            catch
            {
                Console.WriteLine(" file not writtten ");
            }
            Console.ReadLine();

            // When im reading in the bills text
            StreamReader OO;


            OO = File.OpenText("C:\\Users\\RON TAYLOR\\Desktop\\Computer Programing\\Bills.txt");


            while ((totalchargesdisplay = OO.ReadLine()) != null)
            {
                Console.WriteLine();
                totalchargesdisplay = OO.ReadLine();
            }

            OO.Close();
        }