Hi Guys!
i have this array
InformationList = {“name”, “lastname”, “age”, “Date of birth”}
I’m trying to insert a string into position 2 of this array.
exemplo: InformationList = {“name”, “lastname”, “x” ,“age”, “Date of birth”}
I tried to use the activities ADD TO COLLECTION… but I’m not getting to create the code correctly
Yoichi
(Yoichi)
2
Hi,
Can you try the following?
InformationList = InformationList.Take(2).Concat({"x"}).Concat(InformationList.Skip(2)).ToArray()
or
listVar = InformationList.ToList
listVar.Insert(2,"x")
InformationList=listVar.ToArray
note: listVar is List<string>
Regards,
1 Like
Hi! The First solution Worked!
Thanks! ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)
1 Like
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.