if (<certain criteria>)
{
Prop_Merged.AddRange(L1_PROP);
Prop_Merged.AddRange(L1_Test);
L1_PROP = Prop_Merged;
}
//where L1_PROP and L1_Test are Lists and
//so is Prop_Merged
Refactorings
No refactoring yet !
Rik Hemsley
April 13, 2011, April 13, 2011 06:19, permalink
Can you please try to re-explain the problem? Your specification suggests taking information from list2 which is already in list1, putting it in list1 (again) and then in list2 (again), which doesn't seem particularly useful.
Also this is a code refactoring site, not a general programming help site, so if you don't get assistance, please don't be offended.
stgn
April 13, 2011, April 13, 2011 16:21, permalink
@silverfox1208.myopenid.com: Rik Hemsley is absolutely right. Ask your question for instance on www.stackoverflow.com.
So I am new to C#2.0 and have very little programming experience. I am having trouble merging 2 lists in C#2.0. I do not have higher version of C# and hence I am stuck with this , else I would have used using System.Linq
The thing is. I have list1 and list2. list1 contains the information of the previous steps.
list2 contains information of current step. I have made a search algorithm, which should merge the 2 lists if certain criteria is met.
what I want is, that once certain list2 information is found in list1, take that information from list1, add it (prefix it) to list2 information and add this new entry to list1.
if someone could help me ASAP, it'd be great.
thanks