I have
var array = new JArray(new string[] { "one", "two", "three" });
But array.IndexOf(new JValue("one"))
returns -1
, which means that no such item found.
How to use IndexOf
correctly to obtain index of element by value?
I have
var array = new JArray(new string[] { "one", "two", "three" });
But array.IndexOf(new JValue("one"))
returns -1
, which means that no such item found.
How to use IndexOf
correctly to obtain index of element by value?
See this GitHub issue. Also, here is the linked stackoverflow question in the issue.