skip to Main Content

Json – Converting jarray to IEnumerable gives "does not contain a definition for Concat"

I've got the following code: using System; using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; public class Program { public static void Main() { var json = JsonConvert.DeserializeObject<dynamic>("["test1", "test2"]"); var list = json.ToObject<IEnumerable<string>>().Concat(new[] { "test3" }); Console.WriteLine(string.Join(", ", list)); } } I…

VIEW QUESTION
Back To Top
Search