title: C# How go through a text file to find a specific value
body: <p>I was trying to figure out how to go through a text file where the contents are formatted like this: </p>
  
  <pre><code>Date: 7/30/2013 12:00:00 AM 
  Source Path: C:\FileMoveResults 
  Destination Path: C:\Users\Documents\.NET Development\testing\ 
  Last Folder Updated: 11.0.25.1
  </code></pre>
  
  <p>Where I could search it depending on the "Last Folder Updated" and store the source path and destination path in seperate variables.</p>
  
  <p>How would one go about doing this? </p>
  
  <p>Thanks!</p>
  
  <p>Edit: </p>
  
  <p>Here is the code I currently have which doesnt work since i'm getting the error that "foreach doesn't support bool"</p>
  
  <pre><code>using (var reader = new StreamReader(GlobalVars.strLogPath))
  {
  foreach (var items in File.ReadLines(GlobalVars.strLogPath))
  {
  foreach(var item in items.StartsWith("Destination Path: "))
  {
  //nothing here yet
  </code></pre>