I’ve list of strings where I’ve data as follows:
[0] - A
[1] - B
[2] - C
If the list has more than one element, I can do the following to count:
int val = item.Count; //item is the list of string object
Now I am trying to do something like this and not pretty sure if that’s possible to do, I am iterating the list at a time, my requirement is as follows:
[0] - A
[1] - B
[2] - C
To:
[0] - ABC //Later I can get the length of three
I can do the following but expecting it to get done in one go:
string str = "";
foreach(var list in item) //Rather iterating with foreach loop, in one go get the total count of the first index, later the second index
{
str += list;
}