How can I remove entries from a list of strings starting from nth position?
Which means if I have a list containing 10 elements, and if n=7, I need remove the 8th, 9th and 10th entries and get only the first 7 entries.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use the
List<T>.RemoveRangemethod. Or use LINQ to create a new list with only the elements satisfying your criteria.