lavint
June 29, 2018, 3:49pm
1
Hi all,
I have these items that I get from the for each loop. I am hoping to assign these items into an array instead of string which I use string.join. could you please provide the syntax? Thanks in advance!
@ovi , if you may know?
Warm regards,
Lavina
Hello @lavint ,
Please refer to this link, if this is what you require!
Great example! Could you please help me extend it, so that output will come in quotes like “John”,“Jane”,“Albert”…etc.
lavint
June 29, 2018, 3:56pm
3
Hi @Rishabh_Lakhera ,
Thanks for your response! I’d like it to be String not String.
For each item in items
I do something
then Assign String itemString = … .ToArray()
Do you know the Syntax? Thanks!
Warm regards,
Lavina
May i know what you’re looping through with for each? is it a list? or another array?
lavint
June 29, 2018, 5:16pm
5
Sure.
For each item in Directory.getfile blah
For each str in string strA
if item.Contains(str)
Assign string thisIsWhatINeed = … . ToArray()
String.join(blahblah).split.toArray()?
I am just wondering if there is a more efficient way in stead of join then split for the array.
Thanks
@lavint
Could you please check if this helps you?
This is how i assigned the list items to the array.
Main (1).xaml (18.6 KB)
lavint
June 29, 2018, 5:37pm
7
Definitely! thanks @Rishabh_Lakhera
I think join then split maybe a more simple fit for my situation. Thank you very much though