I have this .NET 4.0 code:
var myTable = tables[1];
myTable = tables.Item["Table1"];
myTable = tables.OfType<Excel.ListObject>().FirstOrDefault(t => t.Name == "Table1");
I am trying to compile with .NET 3.5 and getting a bunch of errors:
Error 23 Property, indexer, or event 'Item' is not supported by the language; try directly calling accessor method 'Microsoft.Office.Interop.Excel.ListObjects.get_Item(object)'
and
Error 24 'Microsoft.Office.Interop.Excel.ListObjects' does not contain a definition for 'OfType' and the best extension method overload 'System.Linq.Queryable.OfType(System.Linq.IQueryable)' has some invalid arguments
and
Error 25 Instance argument: cannot convert from 'Microsoft.Office.Interop.Excel.ListObjects' to 'System.Linq.IQueryable'
Can you please guide me on exactly what these errors mean so that I can try to convert this to .NET 3.5?
Thank you so much for your advice.