I have a class as shown below that stores a Uri object and also a count. The idea is that I create a list of UrlPackage objects to hold Links found when trawling a domain and a count of how many times they were found. The problem is how to check if a Uri has already been added to the list.
I used to store the Uri's directly in a list therefore just used the following:
linkList.Contains(Uri)
But now I want to find if UriPackage.UriObj exists within List.
I'm thinking linq is the way forward but not sure how to use it. Any ideas?
class UrlPackage
{
private Uri _UriObj;
private int _Count;
public int Count
{
get { return _Count; }
set { _Count = value; }
}
public Uri UriObj
{
get { return _UriObj; }
set { _UriObj = value; }
}
}