Hi need help having an error { ! … } , when using a variable in a Linq query for FileInfo(). sample code below:
System.IO.Directory.GetFiles(WorkFolderPath).Where(Function(s) New FileInfo(s).Name.ToUpper.Contains(varSamples) And New FileInfo(s).Name.ToUpper.Contains(varMsg))
but if I use the live strings like:
System.IO.Directory.GetFiles(WorkFolderPath).Where(Function(s) New FileInfo(s).Name.ToUpper.Contains(“MY SAMPLE EMAIL”) And New FileInfo(s).Name.ToUpper.Contains(“.MSG”))
there’s no Object Disposed error.
Thanks in advance for the help.