title: VB - Had a function working, doesn't anymore
body: <p><strong><em>EDIT:</em></strong> Ok, it's because I'm using 2.0 Framework. Any ideas how I can modify that area or alternatives? I have to, unfortunately, stick with 2.0</p>
  
  <pre><code>Dim dir2 As New DirectoryInfo("d:\input")
      Dim sw2 As New StreamWriter("d:\input\reportCond.txt")
      For Each fi2 As FileInfo In dir2.GetFiles("report.txt")
          Dim sr2 As New StreamReader(fi2.FullName)
          While Not sr2.EndOfStream
              Dim sLine As String = sr2.ReadLine
              Dim myPath As String = sLine
              Dim fileName As String =System.IO.Path.GetFileNameWithoutExtension(myPath)
              Dim letters As String = fileName.Where(Function(c) Char.IsLetter(c)).ToArray
              Dim comp As String = sLine.Substring(28)
              sw2.WriteLine(letters)
          End While
      Next
  </code></pre>
  
  <p>The Code above was working fine yesterday, today it doesn't and I can't figure out why. The only difference was yesterday I ran it on VS2013, today it doesn't work on VS2010. </p>
  
  <p>I get an error on Function saying "expression expected"</p>
  
  <p>And another one on sw2.WriteLine(letters) saying "Name 'letters' is not declared.</p>