title: how to convert a string to bool in given data c#
body: <p>I have a file that contains <code>.out</code> at the end of each line. I have to remove <code>.out</code> from every line or replace it with an empty string. I am trying but couldn't get it.</p>
  
  <pre><code>string find=".out";
  string replace=" ";
  
  var lineParts = fileLine.Split(new[] { delimeter},StringSplitOptions.None);
  if(lineParts.Length &gt; 1)
      lineParts = lineParts.Skip(1).ToArray();
  
  var data = string.Join(delimeter, lineParts.Skip(lineParts.Length - 7));
  if (!checkIfExist(data))
      lineData.Add(data);
  
  File.WriteAllLines(@"C:\Users\Adnan Haider\Desktop\line.txt", lineData);
  
  // input samples 
  // cpo.gujranwala63201771901PM_Bteq_BT_Bteq_Telenor_User_cpo_gu‌​jranwala_232_102426.‌​out 
  // output
  // Telenor_User_cpo_gujranwala_232_102426.out 
  </code></pre>
  
  <p>I have to replace .out with empty string</p>