|
-
Mar 19th, 2010, 12:24 PM
#1
[RESOLVED] Can someone help me with a List comparison?
I have a class called "ImageThumbnail", one field of which is an IO.FileInfo object. I have one ListA =List(Of ImageThumbnail) and another List B =List(Of IO.FileInfo).
I want to find all the ImageThumbnails in ListA whose FileInfo isn't in ListB.
I can't work out the right syntax to do this, despite all the examples in MSDN. I don't think I can take advantage of List.Contains because the FileInfo in ListA won't be the same object as the one I'm interested in in ListB; it will just have certain field values the same. So I have written a Comparer for FileInfos which overrides the Equals method, and that means I can use FileInfo.Equals. But I can't figure out how to fit it all together.
Any suggestions gratefully received. Cheers, BB
Last edited by boops boops; Mar 19th, 2010 at 12:32 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|