Iterating JsonData through foreach fetches IDictionary
enumerator instead of IList
one.
foreach (var jsonEntry in jsonData)
This causes my code to throw an error.
InvalidOperationException: Instance of JsonData is not a dictionary
LitJson.JsonData.EnsureDictionary ()
LitJson.JsonData.System.Collections.Specialized.IOrderedDictionary.GetEnumerator ()
LitJson.JsonData.System.Collections.IDictionary.GetEnumerator ()
Casting the object to IList
causes Resharper to issue a warning "Type cast is redundant."
foreach (var jsonEntry in jsonData as IList)
Why does Resharper think the cast is redundant ?