General information
Title:
How to pass the result of Linq as a Parameter
I have a piece of Linq Code as:
var queryRep =
(
from rows in dt.AsEnumerable()
where rows.RowState != DataRowState.Deleted
group rows by new { Rep = rows.Field string ("Rep") }
into myGroup
select new { Rep = myGroup.Key.Rep }
);
This 'Creates' a queryRep which I now want to pass into another method, and use it. What is the syntax for doing this
e.g.
MyMethod(queryRep)
public void MyMethod(xxx queryRep)
{
// do stuff with the output from the linq statement
}
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only