G
Guest
Hi,
I need to prefome a sync process on two Lists
Lets say i have two Lists of type string.
And each list can be dimensioned differently, but will eventually
contain the same amount of elements at some point.
Each list has a default element that must always remain these will
always be different form each other.
And one List will always be the master and all others lists will
ether add or subtract to from the master list to them self's.
What is the best way to go about matching the child list to the parent.
When they become different.
Lets say List A is the master
List<string> listA = new List<string>({"Red", "Green", "Blue", "Yellow"});
// List B can never contain element "Yellow" so we will remove
listA.Remove("Yellow");
// List B will always contain element "Black"
// remove all other elements form ListB that are not in
// List A
List<string> listB = new List<string>({"Red", "Green", "Blue", "White",
"Purple", "Orange", "Black"});
Thank you very much for your response.
Ron
I need to prefome a sync process on two Lists
Lets say i have two Lists of type string.
And each list can be dimensioned differently, but will eventually
contain the same amount of elements at some point.
Each list has a default element that must always remain these will
always be different form each other.
And one List will always be the master and all others lists will
ether add or subtract to from the master list to them self's.
What is the best way to go about matching the child list to the parent.
When they become different.
Lets say List A is the master
List<string> listA = new List<string>({"Red", "Green", "Blue", "Yellow"});
// List B can never contain element "Yellow" so we will remove
listA.Remove("Yellow");
// List B will always contain element "Black"
// remove all other elements form ListB that are not in
// List A
List<string> listB = new List<string>({"Red", "Green", "Blue", "White",
"Purple", "Orange", "Black"});
Thank you very much for your response.
Ron