I canโt use AsEnumerable () in a DataTable, I use C # 3, but I just target framework 2.0 (LINQ is provided by LINQBridge ). Is there a way to make a DataTable enumerable without using Select ()?
bool isExisting = (bdsAttachments.DataSource as DataTable).Select().Any(xxx => (string)dr["filename"] == filename);
Update:
I wanted it to look like this:
bool isExisting = (bdsAttachments.DataSource as DataTable).AsEnumerable().Any(xxx => (string)dr["filename"] == filename);
I get a suspicion that the Select DataTable method returns a copy, I think itโs easy to use AsEnumerable, the problem is that I just target the 2.0 framework, System.Data.DataSetExtensions is not available
By the way, I tried this: http://cs.rthand.com/blogs/blog_with_righthand/archive/2006/01/15/284.aspx , but it has compilation errors.
source share