title: How to read a delimited line of strings and ints and extract them for processing in VB
body: <p>I have the following text file (ExamMarks.txt)</p>
  
  <p><strong>John, 85, 95, 90</strong></p>
  
  <p><strong>Micheal, 60, 75, 75</strong></p>
  
  <p>I want to extract a line and take the Name and separately and the ints separately. Then I want to print the name and the average of the numbers like this in a label:</p>
  
  <p><strong>John's average is 90</strong></p>
  
  <p><strong>Micheal's average is 70</strong></p>
  
  <p>So far I can only display what is in the text file in a  label (see below):</p>
  
  <pre><code>Dim FILE_NAME As String = "C:\ExamMarks.txt"
  Dim TextLine As String
  
  If System.IO.File.Exists(FILE_NAME) = True Then
  
    Dim objReader As New System.IO.StreamReader(FILE_NAME)
  
    Do While objReader.Peek() &lt;&gt; -1
      TextLine = TextLine &amp; objReader.ReadLine &amp; vbNewLine
  
    Loop
  
    lblResults.Text = TextLine
  
  Else
  
    MsgBox("File Does Not Exist")
  
  End If
  </code></pre>
  
  <p>Any help is appreciated.</p>