JsonArray 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
public ref class JsonArray : System::Json::JsonValue, System::Collections::Generic::ICollection<System::Json::JsonValue ^>, System::Collections::Generic::IEnumerable<System::Json::JsonValue ^>, System::Collections::Generic::IList<System::Json::JsonValue ^>
public class JsonArray : System.Json.JsonValue, System.Collections.Generic.ICollection<System.Json.JsonValue>, System.Collections.Generic.IEnumerable<System.Json.JsonValue>, System.Collections.Generic.IList<System.Json.JsonValue>
type JsonArray = class
inherit JsonValue
interface IList<JsonValue>
interface ICollection<JsonValue>
interface seq<JsonValue>
interface IEnumerable
Public Class JsonArray
Inherits JsonValue
Implements ICollection(Of JsonValue), IEnumerable(Of JsonValue), IList(Of JsonValue)
- 继承
- 实现
注解
注意
命名空间 System.Json 是为不再受支持的 Silverlight 设计的。 若要处理 JSON,建议改用 命名空间中的 System.Text.Json API。
构造函数
JsonArray(IEnumerable<JsonValue>) | |
JsonArray(JsonValue[]) |
属性
Count |
获取 ICollection<T> 中包含的元素数。 |
IsReadOnly |
获取一个值,该值指示 ICollection<T> 是否为只读。 |
Item[Int32] |
获取或设置指定索引处的元素。 |
Item[String] | (继承自 JsonValue) |
JsonType |
方法
Add(JsonValue) |
将某项添加到 ICollection<T> 中。 |
AddRange(IEnumerable<JsonValue>) | |
AddRange(JsonValue[]) | |
Clear() |
从 ICollection<T> 中移除所有项。 |
Contains(JsonValue) |
确定 ICollection<T> 是否包含特定值。 |
ContainsKey(String) | (继承自 JsonValue) |
CopyTo(JsonValue[], Int32) |
从特定的 ICollection<T> 索引开始,将 Array 的元素复制到一个 Array 中。 |
Equals(Object) |
确定指定对象是否等于当前对象。 (继承自 Object) |
GetHashCode() |
作为默认哈希函数。 (继承自 Object) |
GetType() |
获取当前实例的 Type。 (继承自 Object) |
IndexOf(JsonValue) |
确定 IList<T> 中特定项的索引。 |
Insert(Int32, JsonValue) |
在 IList<T> 中的指定索引处插入一个项。 |
MemberwiseClone() |
创建当前 Object 的浅表副本。 (继承自 Object) |
Remove(JsonValue) |
从 ICollection<T> 中移除特定对象的第一个匹配项。 |
RemoveAt(Int32) |
移除位于指定索引处的 IList<T> 项。 |
Save(Stream) | |
Save(TextWriter) | (继承自 JsonValue) |
ToString() | (继承自 JsonValue) |
显式接口实现
IEnumerable.GetEnumerator() |
返回循环访问集合的枚举数。 |
IEnumerable<JsonValue>.GetEnumerator() |
返回一个循环访问集合的枚举器。 |
扩展方法
AsReadOnly<T>(IList<T>) |
返回指定列表的只读 ReadOnlyCollection<T> 包装器。 |
CopyToDataTable<T>(IEnumerable<T>) |
在给定其泛型参数 |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
在给定其泛型参数 |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
在给定其泛型参数 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈