Hi everybody,
I found the similar old thread, but decided to start a new one. How can I concatenate elements of the array excluding the first one when the length of the array is greater than 1? Here is the original code that is not working on my test data:
var descripArray = ticketTemplates[t].Descrip.Split('-');
ticketTemplates[t].Descrip = "[" + descripArray[1] + ", " + descripArray[2] + ", " + descripArray[3] + "]";
This is how I re-wrote it, but I noticed that it's not the same, as the first element needs to be not concatenated:
var descripArray = ticketTemplates[t].Descrip.Split('-');
ticketTemplates[t].Descrip = "[" + String.Join(", ", descripArray) + "]";
So, looking for a simple way to correct my correction to remove the first element in case we have more than 1 element in that array.
Thanks in advance.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles