I have a Linq query against a DataRow [] that returns elements from each row. It looks a bit like this:
var query = from row in rows select row["Id"];
I want to convert this to int [], but the following code generates an error:
int[] myIntArray = query.ToArray();
Error:
Cannot implicitly convert type object[] to int[]
Is there any smart trick to do this job?
source share