Click here to Skip to main content
16,005,281 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
class myFile{

public filename
public filedate

}

List<myfile> source = new List<<myfile>();
add files..
<list><myfile> target = new List<myfile>();
add files..</myfile></myfile></list></myfile></myfile>


Compare the list and return
1) List of files unique to source list
2) List of files unique to target list
3) List of source files where target date is diffrent

I can do this with three foreach statements
but is there an easy way using linq or Lambda expression?
Posted
Updated 24-Mar-11 19:56pm
v3
Comments
Toniyo Jackson 25-Mar-11 1:56am    
Use pre tag for code

1 solution

Have a look at the LINQ Except[^] method.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900