I am using the following example from Stackoverflow:
How to find the oldest Folder in a Folder vb.net
Dim dirPrograms As New DirectoryInfo("c:\program files")
' LINQ query for oldest directory
Dim dir = (From dir In dirPrograms.EnumerateDirectories()).Min(function (o) o.CreationTime).FirstOrDefault()
I get the following error: Range variable 'dir' hides a variable in an enclosing block or a range variable previously defined in the query expression.
No one else is complaining about an error so I assume I must be doing something wrong.