Hi,
I have two lists - list1 and list2. i want to concatinate list 1 item + list 2 item and save to txt file.below code is not working how we can loop parellely?
C#
foreach (string code in List1)
{
for (int i = 0; i < List2.Count; i++)
{
if (code != "")
{
string total = code + ", " + "'" + List2[i] + "')";
fullcode.Add(total);
}
}
}
Muhammad Imran AnsariRank #326 · 7.6K reputationPosted May 12, 2022, 1:52 PM EDT
Nitin SontakkeRank #264 · 9.6K reputationPosted May 12, 2022, 10:19 AM EDT
Sujeet RamanRank #1,329 · 1.3K reputationPosted May 12, 2022, 10:41 AM EDT
Nitin SontakkeRank #264 · 9.6K reputationPosted May 12, 2022, 10:54 AM EDT
Sujeet RamanRank #1,329 · 1.3K reputationPosted May 12, 2022, 11:11 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted May 12, 2022, 11:48 AM EDT