I got this error when I tried to run the good which gives and object reference not to an instance of an object
this is the code
- string responseString = reader.ReadToEnd();
- dynamic jsonData = JsonConvert.DeserializeObject(responseString);
- var results = new List<Result>();
- foreach (var item in jsonData.items)
- {
- results.Add(new Result
- {
- Title = item.title,
- Link = item.link,
- Snippet = item.snippet,
- });
- }
please kindly help