JsonArray.IndexOf(JsonValue) 方法

定义

确定 IList<T> 中特定项的索引。

public:
 virtual int IndexOf(System::Json::JsonValue ^ item);
public int IndexOf (System.Json.JsonValue item);
abstract member IndexOf : System.Json.JsonValue -> int
override this.IndexOf : System.Json.JsonValue -> int
Public Function IndexOf (item As JsonValue) As Integer

参数

item
JsonValue

要在 IList<T> 中定位的对象。

返回

如果在列表中找到,则为 item 的索引;否则为 -1。

实现

注解

备注

命名空间 System.Json 是为不再受支持的 Silverlight 设计的。 若要处理 JSON,建议改用 命名空间中的 System.Text.Json API。

适用于