Hi
On Debugging in item.snippet.tags value is shown as in array like below . I want to save this value in string with comma separated
[0]football
[1]goal
[2]soccer
[3]scotland.
Thanks
Hi
On Debugging in item.snippet.tags value is shown as in array like below . I want to save this value in string with comma separated
[0]football
[1]goal
[2]soccer
[3]scotland.
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted Apr 5, 2024, 1:48 AM EDT
Try this :
string[] tagsArray = item.snippet.tags.ToArray(); string tagsString = string.Join(", ", tagsArray); Console.WriteLine(tagsString);Amit MohantyRank #112 · 20K reputationPosted Apr 5, 2024, 1:36 AM EDT
Check the below example, this may help you.
string[] tags = new string[] { "football", "goal", "soccer", "scotland" }; string tagsString = string.Join(", ", tags); Console.WriteLine(tagsString); // Output: football, goal, soccer, scotlandRamco RamcoRank #462 · 5.4K reputationPosted Apr 5, 2024, 1:45 AM EDT
Hi
I am getting error 'Cannot implicitly convert system.collection.generic.list.tostring[]
string[] tags = item.snippet.tags;
Thanks