If I have two IEnumerable A and B, where B is a "sub-collection of A":
IEnumerable<Price> A = List of Price;
IEnumerable<Price> B = A.Where(x => x.Status == "N");
Will updating some properties of the Prices in B automatically update those same Prices and their properties in A?
foreach(var price in B)
{
price.Date = DateTime.Now;
price.Status = "F";
}
Will those same Prices in A that are in B now have their Date and Status properties updated? If not, what's the best way to update them? I already have an IEqualityComparer overriding the Equals and GetHashCode methods for something else. Is there a quick way to update all Price properties of A with the Price properties from B for "Equal" Prices?