title: read specific values from text file
body: <p>I have the following visual basic code, which is part of a custom class. I want a simple and effective way(use little computer resources) to assign the "value1" value(100) to "_field1","value2" value(8) to "_field2" etc. Any nice ideas? thanks</p>
  
  <pre><code>Private Sub readcrnFile()
      'read files and assing values to the properties
      Dim sr As New IO.StreamReader(_fileName)
  
      _field1 = sr.ReadToEnd()
      _field2 = sr.ReadToEnd()
      _field3 = sr.ReadToEnd()
  
      sr.Close()
  
  End Sub
  </code></pre>
  
  <p>where _fileName is a full path to a text file which looks like this:</p>
  
  <blockquote>
    <p>value1: 100</p>
    
    <p>value2: 8</p>
    
    <p>value3: 80</p>
  </blockquote>