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
Virgil Bevans
NA
16
6.7k
Query not returning results
Aug 20 2013 5:08 PM
Program creates/adds to data table of songs from specified folder(s), obtaining initial data by parsing the file names. User can search any time for new entries, so program needs to check to see if song is already in the data file. Wrote the following linq query to check for this condition, but it never returns results. Can someone explain my folly?
//search for duplicate record and loop if found
var result =
from kSong in DtSongs.AsEnumerable()
where kSong["DiskID"].ToString() == song[3] && kSong["Title"].ToString() == song[1] && kSong["Artist"].ToString() == kSong[2]
select kSong;
foreach (var r in result)
{
count++;
}
Reply
Answers (
3
)
Get the Total Count of TimeStamp in LINQ
Select dynamic columns with Linq c#