[Solved] How do you populate two Lists with one text file based on an attribute? [closed]
By the suggestions in the comments, partialy @Charles_May ‘s: Simply looping: List<string> Source = {}; //source list List<string> Females = new List<string>(), Males = new List<string>(); foreach (string value in Source) { if (value.ToUpper().Contains(“,F,”)) //Female { Females.Add(value); } else { Males.Add(value); } }//result: both lists are with values That’s it. if you’s like to make … Read more