title: How to Read from a text file and then Write to another in one Console application?
body: <pre><code> static void Main(string[] args)
      {
  
  
          FileInfo fileInfo = new FileInfo("C:\\Users\\Alameer Ashraf\\Desktop\\data binding and I Ostreaming\\ResultFile.txt");
          using (StreamWriter writer = fileInfo.CreateText())
          {
              FileInfo Teto = new FileInfo("C:\\Users\\Alameer Ashraf\\Desktop\\data binding and I Ostreaming\\WorkerTable.txt");
              foreach (string line in File.ReadLines("C:\\Users\\Alameer Ashraf\\Desktop\\data binding and I Ostreaming\\WorkerTable.txt"))
              {
  
                  string[] columns = line.Split(',');
  
                  Console.WriteLine("&lt;Name&gt;");
                  Console.WriteLine(columns[0]);
                  Console.WriteLine("&lt;" + "/" + "Name" + "&gt;");
  
                  Console.WriteLine("&lt;ID &gt;");
                  Console.WriteLine(columns[1]);
                  Console.WriteLine("&lt;" + "/" + "ID " + "&gt;");
  
                  Console.WriteLine("&lt;Number&gt;");
                  Console.WriteLine(columns[2]);
                  Console.WriteLine("&lt;" + "/" + "Number " + "&gt;");
  
                  Console.WriteLine("&lt;Job&gt;");
                  Console.WriteLine(columns[3]);
                  Console.WriteLine("&lt;" + "/" + "Job " + "&gt;");
              }
              Console.ReadLine();
          } 
  </code></pre>
  
  <p>i failed to do what i have been explained ??
  help please 
  i want to read from a file , then write what i'm reading into another one by using the same application ,  can i do that ? 
  i want to read an .csv file and  extract information from , then rewriting that information into another text file in the same console application , using IO File stream . </p>