I have a List of 10,000 entries of type Element
:
public class Element
{
public Element()
{
this.Id = Guid.NewGuid();
}
public Guid Id { get; set };
}
And I have another List of 5,000 entries of type Link
:
public class Link
{
public Link(Guid ElementOne, Guid ElementTwo)
{
this.ElementOne = ElementOne;
this.ElementTwo = ElementTwo;
}
public Guid ElementOne { get; set; }
public Guid ElementTwo { get; set; }
}
I am populating my Lists here:
for (int i = 0; i < 10,000; i++)
this.ListOfElements.Add(new Element());
for (int i = 0; i < 5,000; i++)
{
this.ListOfLinks.Add(new Link(need ElementOne, need ElementTwo));
}
I am not sure what to pass for ElementOne
and ElementTwo
. I want to grab a random Id from the Element List (Element.Id
) for both parameters and ensure they're unique (ElementOne
could never be ElementTwo
).