TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
whizkid gps
NA
3
5.4k
LINQ IEnumerable Datarow Select
Jul 7 2016 12:33 PM
I've been using following LINQ for querying records from IEnumerable(Datarow). Instead of hardcoding field names in Linq, I want to pass string[] as input parameter and field names needs to be retrieved from string[]. Please assist me on this.
List<
string
[]> IDcolls = drResults.Select(q =>
new
[]
{
q[
"empid"
].ToString(),
q[
"empname"
].ToString()
})
.Skip(mBatch * batchSize)
.Take(batchSize)
.ToList();
string
[] IDs = (from q
in
drResults
select q[
"empid"
].ToString())
.Skip(i * batchSize)
.Take(batchSize)
.ToArray();
Reply
Answers (
1
)
Data continuously inserted in table
Query Conversion