It is hard to explain my problem writing it in "normal" language so I'll just post my code (it would be easier to understand):
I have my class File
:
public class File
{
public string Url { get; set; }
public string Name { get; set; }
public string Date { get; set; }
public Bitmap Bitmap { get; set; }
}
So I created a list of files
:
var files = new List<File>();
and, I have populated it with data.
Now I have a string
(and only that.) I would like to find the index of the element containing that string
in my list.
Something like:
int index = files.IndexOf(new File
{
string.Empty,
myString,
string.Empty,
null
});
Any idea?