I'm working with an object declared as shown.
DataCollection<Entity> collection = GetDataCollection(...);
Then, I'm picking out two sets of data as below.
IEnumerable<String>
array_1 = collection.Select(
element => element.Attributes["attribute_1"] as String),
array_2 = collection.Select(
element => element.Attributes["attribute_2"] as String);
I'm terribly curious if those two arrays are guaranteed to have the same order. I.e. if their separate orders must be the same as in the original sequence. Or, at the very least, if the order would change for any reason, will the i
th element in the first separate list still correspond to the i
th element in the other?