- Home /
Referencing System.Data.DataSetExtensions.dll
I need to reference to System.Data.DataSetExtensions.dll to use Linq To DataSet
I am running this piece of code: DataTable dt = _dataSetCache.Tables["table0"];
var query = from d in dt.AsEnumerable()
orderby d.Field<int>("INSTANCES")
select d;
and getting this error
The type arguments for method `System.Linq.Enumerable.AsEnumerable(this System.Collections.Generic.IEnumerable)' cannot be inferred from the usage. Try specifying the type arguments explicitly
How do I reference to make AsEnumerable available for my datatable in unity
Answer by landon912 · Oct 02, 2015 at 12:53 PM
The issue isn't with referencing the .dll. The issue is your use of it. Since I don't have that library, I can only guess that it wants this:
var query = from d in dt.AsEnumerable(this.dt)
orderby d.Field<int>("INSTANCES")
select d;
Your answer

Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
dll error when build 4 Answers
Bringing in classes from a DLL 1 Answer
InvalidProgramException: Invalid IL code with Mono.Cairo on MacOS 0 Answers