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>) |
根據輸入 DataTable 物件 (其中泛型參數 |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
根據輸入 DataRow 物件 (其中泛型參數 |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
根據輸入 DataRow 物件 (其中泛型參數 |
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應