Hi,
Is it possbile to join only specific items in a list using indexes.
Lets say I have 100 items,i would only like to join items[1-30].
Please advise.
Hi,
Is it possbile to join only specific items in a list using indexes.
Lets say I have 100 items,i would only like to join items[1-30].
Please advise.
Something like this should work:
List<int> testlist = new List<int>();
//fill list here
int startindex = 1;
int endindex = 30;
string joinedindexes = string.Join(" ", testlist.GetRange(startindex, endindex - startindex).ToArray());
Thanks alot.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.