Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
LINQ IEnumerable Datarow Select
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
whizkid gps
8y
378
1
Reply
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();
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Data continuously inserted in table
Query Conversion