title: Formatting text table in file, merging two lines per row into one
body: <p>I'm trying to write some information to a text file but the second row making spaces between the lines</p>
  
  <p>The code :</p>
  
  <pre><code>private void CreateDriversList()
  {
      StreamWriter w = new StreamWriter(contentDirectory + "\\" + "Drivers.txt");
      w.WriteLine("Module Name  Display Name           Driver Type   Link Date");
      w.WriteLine("============ ====================== ============= ======================");
      //Declare, Search, and Get the Properties in Win32_SystemDriver
      System.Management.SelectQuery query = new System.Management.SelectQuery("Win32_SystemDriver");
      System.Management.ManagementObjectSearcher searcher = new System.Management.ManagementObjectSearcher(query);
      foreach (System.Management.ManagementObject ManageObject in searcher.Get())
      {
          w.WriteLine(ManageObject["Name"].ToString());
          w.WriteLine("             " + ManageObject["DisplayName"].ToString());
      }
      w.Close();
  }
  </code></pre>
  
  <p>Once i added the line : </p>
  
  <pre><code>w.WriteLine("             " + ManageObject["DisplayName"].ToString());
  </code></pre>
  
  <p>The result in the text file is like this :</p>
  
  <pre><code>Module Name  Display Name           Driver Type   Link Date
  ============ ====================== ============= ======================
  1394ohci
               1394 OHCI Compliant Host Controller
  3ware
               3ware
  ACPI
               Microsoft ACPI Driver
  acpiex
               Microsoft ACPIEx Driver
  acpipagr
  </code></pre>
  
  <p>Before i added the line the text file was like this :</p>
  
  <pre><code>Module Name  Display Name           Driver Type   Link Date
  ============ ====================== ============= ======================
  1394ohci
  3ware
  ACPI
  acpiex
  acpipagr
  AcpiPmi
  </code></pre>
  
  <p>I just wanted to add the Display Name row now so i added spaces so the row will start under Display Name but then its adding spaces in between the lines.</p>
  
  <p>How can i solve it ?</p>
  
  <p>**</p>
  
  <p>In the end the text file should look like this :</p>
  
  <pre><code>Module Name  Display Name           Driver Type   Link Date             
  ============ ====================== ============= ======================
  1394ohci     1394 OHCI Compliant Ho Kernel        7/26/2012 5:26:46 AM  
  3ware        3ware                  Kernel        3/8/2012 10:33:45 PM  
  ACPI         Microsoft ACPI Driver  Kernel        9/20/2012 9:09:16 AM  
  acpiex       Microsoft ACPIEx Drive Kernel        7/26/2012 5:25:57 AM  
  acpipagr     ACPI Processor Aggrega Kernel        7/26/2012 5:27:16 AM  
  AcpiPmi      ACPI Power Meter Drive Kernel        7/26/2012 5:27:33 AM  
  acpitime     ACPI Wake Alarm Driver Kernel        7/26/2012 5:27:37 AM  
  </code></pre>
  
  <p>And in the display name row and maybe also in the moudle name row to make sure the names will be in one line full names.</p>
  
  <p>For example in Display Name : 1394 OHCI Compliant Ho 
  Should be : 1394 OHCI Compliant Host Controller</p>
  
  <p>**</p>
  
  <pre><code>Module Name  Display Name           Driver Type   Link Date
  ============ ====================== ============= ======================
  1394ohci     1394 OHCI Compliant Host Controller
  3ware        3ware
  ACPI         Microsoft ACPI Driver
  acpiex       Microsoft ACPIEx Driver
  acpipagr     ACPI Processor Aggregator Driver
  AcpiPmi      ACPI Power Meter Driver
  </code></pre>