I have a small struct and I have to compare the values to find which ones have the same FreeFlow text, and then grab that struct ENumber.
public struct Holder
{
public string FreeFlow;
public int ENumber;
}
and here is how I add them
foreach(Class1.TextElement re in Class1._TextElements)
{
//create struct with all details will be good for later
Holder ph = new Holder();
ph.FreeFlow = re.FreeFlow;
ph.ENumber = re.ENumber;
lstHolder.Add(ph);
}
foreach(Class1.TextElement2 re in Class1._TextElements2)
{
//create struct with all details will be good for later
Holder phi = new Holder();
phi.FreeFlow = re.FreeFlow;
phi.ENumber = re.ENumber;
lstHolder2.Add(phi);
}
I can do a comparing using a foreach within a foreach, but I think this will not be the most effective way. Any help?
EDIT: I am trying to determine if freeflow text is exactly the same as the other struct freeflow text