ImmutableArray<T> ImmutableArray<T> ImmutableArray<T> ImmutableArray<T> Struct

定義

代表不可變的陣列,意即在建立該陣列之後,就無法加以變更。Represents an array that is immutable; meaning it cannot be changed once it is created.

NuGet 套件System.Collections.Immutable (關於固定集合及其安裝方法)NuGet package: System.Collections.Immutable (about immutable collections and how to install)

generic <typename T>
public value class ImmutableArray : IEquatable<System::Collections::Immutable::ImmutableArray<T>>, System::Collections::Generic::ICollection<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IList<T>, System::Collections::Generic::IReadOnlyCollection<T>, System::Collections::Generic::IReadOnlyList<T>, System::Collections::IList, System::Collections::Immutable::IImmutableList<T>, System::Collections::IStructuralComparable, System::Collections::IStructuralEquatable
public struct ImmutableArray<T> : IEquatable<System.Collections.Immutable.ImmutableArray<T>>, System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.IReadOnlyList<T>, System.Collections.IList, System.Collections.Immutable.IImmutableList<T>, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable
type ImmutableArray<'T> = struct
    interface ICollection<'T>
    interface seq<'T>
    interface IEnumerable
    interface IList<'T>
    interface IReadOnlyCollection<'T>
    interface IReadOnlyList<'T>
    interface ICollection
    interface IList
    interface IImmutableList<'T>
Public Structure ImmutableArray(Of T)
Implements ICollection(Of T), IEnumerable(Of T), IEquatable(Of ImmutableArray(Of T)), IImmutableList(Of T), IList, IList(Of T), IReadOnlyCollection(Of T), IReadOnlyList(Of T), IStructuralComparable, IStructuralEquatable

類型參數

T

陣列所儲存的項目類型。The type of element stored by the array.

繼承
ImmutableArray<T>ImmutableArray<T>ImmutableArray<T>ImmutableArray<T>
實作

備註

有不同的案例最適用ImmutableArray<T>于, 而其他ImmutableList<T>則適用于。There are different scenarios best for ImmutableArray<T> and others best for ImmutableList<T>.

使用不可變數組的原因:Reasons to use immutable array:

  • 更新資料很罕見, 或元素數目相當小 (少於16個專案)Updating the data is rare or the number of elements is quite small (less than 16 items)

  • 您必須能夠在效能關鍵區段中反復查看資料You need to be able to iterate over the data in performance critical sections

  • 您有許多不可變集合的實例, 而且無法承受將資料保留在樹狀結構中You have many instances of immutable collections and you can't afford keeping the data in trees

使用不可變清單的原因:Reasons to use immutable list:

  • 資料的更新很常見, 或元素數目不應該很小Updating the data is common or the number of elements isn't expected to be small

  • 更新集合比逐一查看內容更具效能關鍵Updating the collection is more performance critical than iterating the contents

下表摘要說明下列各項的效能特性:ImmutableArray<T>The following table summarizes the performance characteristics of ImmutableArray<T>

運營Operation ImmutableArray<T>減少ImmutableArray<T> Complexity ImmutableList<T>減少ImmutableList<T> Complexity 註解Comments
ItemItem O(1)O(1) O (log n)O(log n) 直接索引至基礎陣列Directly index into the underlying array
Add()Add() O(n)O(n) O (log n)O(log n) 需要建立新的陣列Requires creating a new array

欄位

Empty Empty Empty Empty

取得空的不可變陣列。Gets an empty immutable array.

屬性

IsDefault IsDefault IsDefault IsDefault

取得值,指出這個陣列已宣告但未初始化。Gets a value indicating whether this array was declared but not initialized.

IsDefaultOrEmpty IsDefaultOrEmpty IsDefaultOrEmpty IsDefaultOrEmpty

取得值,指出這個 ImmutableArray<T> 是否為空的,或者尚未初始化。Gets a value indicating whether this ImmutableArray<T> is empty or is not initialized.

IsEmpty IsEmpty IsEmpty IsEmpty

取得值,指出這個 ImmutableArray<T> 是否為空的。Gets a value indicating whether this ImmutableArray<T> is empty.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

取得不可變陣列中指定索引處的項目。Gets the element at the specified index in the immutable array.

Length Length Length Length

取得陣列中的項目數。Gets the number of elements in the array.

方法

Add(T) Add(T) Add(T) Add(T)

傳回已在結尾處加入指定項目的原始陣列複本。Returns a copy of the original array with the specified item added to the end.

AddRange(IEnumerable<T>) AddRange(IEnumerable<T>) AddRange(IEnumerable<T>) AddRange(IEnumerable<T>)

傳回已在陣列結尾處加入指定項目的原始陣列複本。Returns a copy of the original array with the specified elements added to the end of the array.

AddRange(ImmutableArray<T>) AddRange(ImmutableArray<T>) AddRange(ImmutableArray<T>) AddRange(ImmutableArray<T>)

傳回已在陣列結尾處加入指定項目的原始陣列複本。Returns a copy of the original array with the specified elements added to the end of the array.

As<TOther>() As<TOther>() As<TOther>() As<TOther>()

傳回新的不可變陣列,其中包含這個陣列中轉換為不同類型的項目。Returns a new immutable array that contains the elements of this array cast to a different type.

AsMemory() AsMemory() AsMemory() AsMemory()

在此不可變陣列上建立新的唯讀記憶體區域。Creates a new read-only memory region over this immutable array.

AsSpan() AsSpan() AsSpan() AsSpan()

在此不可變陣列上建立新的唯讀範圍。Creates a new read-only span over this immutable array.

CastArray<TOther>() CastArray<TOther>() CastArray<TOther>() CastArray<TOther>()

將基礎陣列轉換成 TOther 型別的陣列,以初始化 ImmutableArray<T> 結構的新執行個體。Initializes a new instance of the ImmutableArray<T> struct by casting the underlying array to an array of type TOther .

CastUp<TDerived>(ImmutableArray<TDerived>) CastUp<TDerived>(ImmutableArray<TDerived>) CastUp<TDerived>(ImmutableArray<TDerived>) CastUp<TDerived>(ImmutableArray<TDerived>)

根據現有執行個體的內容初始化新的 ImmutableArray<T> 結構執行個體,允許 Covariant 靜態轉換成有效率地重複使用現有陣列。成Initializes a new instance of the ImmutableArray<T> struct based on the contents of an existing instance, allowing a covariant static cast to efficiently reuse the existing array.

Clear() Clear() Clear() Clear()

傳回已移除所有項目的陣列。Returns an array with all the elements removed.

Contains(T) Contains(T) Contains(T) Contains(T)

判斷指定的項目是否存在於陣列中。Determines whether the specified item exists in the array.

CopyTo(Int32, T[], Int32, Int32) CopyTo(Int32, T[], Int32, Int32) CopyTo(Int32, T[], Int32, Int32) CopyTo(Int32, T[], Int32, Int32)

從指定的開始索引開始,將這個陣列中的指定項目複製到指定的陣列。Copies the specified items in this array to the specified array at the specified starting index.

CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32)

從指定之目的索引開始,將這個陣列的內容複製到指定的陣列。Copies the contents of this array to the specified array starting at the specified destination index.

CopyTo(T[]) CopyTo(T[]) CopyTo(T[]) CopyTo(T[])

將這個陣列的內容複製到指定的陣列。Copies the contents of this array to the specified array.

Equals(ImmutableArray<T>) Equals(ImmutableArray<T>) Equals(ImmutableArray<T>) Equals(ImmutableArray<T>)

表示指定的物件是否等於這個陣列。Indicates whether specified array is equal to this array.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷這個陣列是否等於指定的物件。Determines if this array is equal to the specified object.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回可逐一查看陣列內容的列舉程式。Returns an enumerator that iterates through the contents of the array.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

傳回這個執行個體的雜湊碼。Returns a hash code for this instance.

IndexOf(T) IndexOf(T) IndexOf(T) IndexOf(T)

在陣列中搜尋指定的項目。Searches the array for the specified item.

IndexOf(T, Int32) IndexOf(T, Int32) IndexOf(T, Int32) IndexOf(T, Int32)

在陣列中搜尋指定的項目。Searches the array for the specified item.

IndexOf(T, Int32, IEqualityComparer<T>) IndexOf(T, Int32, IEqualityComparer<T>) IndexOf(T, Int32, IEqualityComparer<T>) IndexOf(T, Int32, IEqualityComparer<T>)

在陣列中搜尋指定的項目。Searches the array for the specified item.

IndexOf(T, Int32, Int32) IndexOf(T, Int32, Int32) IndexOf(T, Int32, Int32) IndexOf(T, Int32, Int32)

在陣列中搜尋指定的項目。Searches the array for the specified item.

IndexOf(T, Int32, Int32, IEqualityComparer<T>) IndexOf(T, Int32, Int32, IEqualityComparer<T>) IndexOf(T, Int32, Int32, IEqualityComparer<T>) IndexOf(T, Int32, Int32, IEqualityComparer<T>)

在陣列中搜尋指定的項目。Searches the array for the specified item.

Insert(Int32, T) Insert(Int32, T) Insert(Int32, T) Insert(Int32, T)

傳回已在指定位置插入指定值的新陣列。Returns a new array with the specified value inserted at the specified position.

InsertRange(Int32, IEnumerable<T>) InsertRange(Int32, IEnumerable<T>) InsertRange(Int32, IEnumerable<T>) InsertRange(Int32, IEnumerable<T>)

在指定的索引處插入指定的值。Inserts the specified values at the specified index.

InsertRange(Int32, ImmutableArray<T>) InsertRange(Int32, ImmutableArray<T>) InsertRange(Int32, ImmutableArray<T>) InsertRange(Int32, ImmutableArray<T>)

在指定的索引處插入指定的值。Inserts the specified values at the specified index.

ItemRef(Int32) ItemRef(Int32) ItemRef(Int32) ItemRef(Int32)

取得唯讀清單中在指定 index 處元素的唯讀參考。Gets a read-only reference to the element at the specified index in the read-only list.

LastIndexOf(T) LastIndexOf(T) LastIndexOf(T) LastIndexOf(T)

從陣列結尾開始,在陣列中搜尋指定的項目。Searches the array for the specified item; starting at the end of the array.

LastIndexOf(T, Int32) LastIndexOf(T, Int32) LastIndexOf(T, Int32) LastIndexOf(T, Int32)

從陣列結尾開始,在陣列中搜尋指定的項目。Searches the array for the specified item; starting at the end of the array.

LastIndexOf(T, Int32, Int32) LastIndexOf(T, Int32, Int32) LastIndexOf(T, Int32, Int32) LastIndexOf(T, Int32, Int32)

從陣列結尾開始,在陣列中搜尋指定的項目。Searches the array for the specified item; starting at the end of the array.

LastIndexOf(T, Int32, Int32, IEqualityComparer<T>) LastIndexOf(T, Int32, Int32, IEqualityComparer<T>) LastIndexOf(T, Int32, Int32, IEqualityComparer<T>) LastIndexOf(T, Int32, Int32, IEqualityComparer<T>)

從陣列結尾開始,在陣列中搜尋指定的項目。Searches the array for the specified item; starting at the end of the array.

OfType<TResult>() OfType<TResult>() OfType<TResult>() OfType<TResult>()

篩選這個陣列的項目,以取得可指派為指定類型的項目。Filters the elements of this array to those assignable to the specified type.

Remove(T) Remove(T) Remove(T) Remove(T)

傳回已從陣列中移除第一個出現之指定項目的陣列。Returns an array with the first occurrence of the specified element removed from the array. 如果找不到相符項目,則會傳回目前的陣列。If no match is found, the current array is returned.

Remove(T, IEqualityComparer<T>) Remove(T, IEqualityComparer<T>) Remove(T, IEqualityComparer<T>) Remove(T, IEqualityComparer<T>)

傳回已從陣列中移除第一個出現之指定項目的陣列。Returns an array with the first occurrence of the specified element removed from the array.

如果找不到相符項目,則會傳回目前的陣列。If no match is found, the current array is returned.

RemoveAll(Predicate<T>) RemoveAll(Predicate<T>) RemoveAll(Predicate<T>) RemoveAll(Predicate<T>)

從陣列中移除符合指定條件的所有項目。Removes all the items from the array that meet the specified condition.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

傳回已移除指定位置處之項目的陣列。Returns an array with the element at the specified position removed.

RemoveRange(ImmutableArray<T>, IEqualityComparer<T>) RemoveRange(ImmutableArray<T>, IEqualityComparer<T>) RemoveRange(ImmutableArray<T>, IEqualityComparer<T>) RemoveRange(ImmutableArray<T>, IEqualityComparer<T>)

從這個清單中移除指定的項目。Removes the specified items from this list.

RemoveRange(IEnumerable<T>, IEqualityComparer<T>) RemoveRange(IEnumerable<T>, IEqualityComparer<T>) RemoveRange(IEnumerable<T>, IEqualityComparer<T>) RemoveRange(IEnumerable<T>, IEqualityComparer<T>)

從這個陣列中移除指定的項目。Removes the specified items from this array.

RemoveRange(Int32, Int32) RemoveRange(Int32, Int32) RemoveRange(Int32, Int32) RemoveRange(Int32, Int32)

傳回已移除指定位置處之項目的陣列。Returns an array with the elements at the specified position removed.

RemoveRange(IEnumerable<T>) RemoveRange(IEnumerable<T>) RemoveRange(IEnumerable<T>) RemoveRange(IEnumerable<T>)

從這個陣列中移除指定的項目。Removes the specified items from this array.

RemoveRange(ImmutableArray<T>) RemoveRange(ImmutableArray<T>) RemoveRange(ImmutableArray<T>) RemoveRange(ImmutableArray<T>)

從這個清單中移除指定的值。Removes the specified values from this list.

Replace(T, T) Replace(T, T) Replace(T, T) Replace(T, T)

尋找陣列中第一個等於指定值的項目,並使用指定的新值來取代該值。Finds the first element in the array equal to the specified value and replaces the value with the specified new value.

Replace(T, T, IEqualityComparer<T>) Replace(T, T, IEqualityComparer<T>) Replace(T, T, IEqualityComparer<T>) Replace(T, T, IEqualityComparer<T>)

尋找陣列中第一個等於指定值的項目,並使用指定的新值來取代該值。Finds the first element in the array equal to the specified value and replaces the value with the specified new value.

SetItem(Int32, T) SetItem(Int32, T) SetItem(Int32, T) SetItem(Int32, T)

以指定的項目取代位於指定索引上的項目。Replaces the item at the specified index with the specified item.

Sort() Sort() Sort() Sort()

使用預設的比較子,來排序不可變陣列中的項目。Sorts the elements in the immutable array using the default comparer.

Sort(IComparer<T>) Sort(IComparer<T>) Sort(IComparer<T>) Sort(IComparer<T>)

使用指定的比較子,來排序不可變陣列中的項目。Sorts the elements in the immutable array using the specified comparer.

Sort(Comparison<T>) Sort(Comparison<T>) Sort(Comparison<T>) Sort(Comparison<T>)

使用指定的 Comparison<T> 來排序整個 ImmutableArray<T> 中的項目。Sorts the elements in the entire ImmutableArray<T> using the specified Comparison<T>.

Sort(Int32, Int32, IComparer<T>) Sort(Int32, Int32, IComparer<T>) Sort(Int32, Int32, IComparer<T>) Sort(Int32, Int32, IComparer<T>)

使用指定的比較子,來排序不可變陣列中指定的項目。Sorts the specified elements in the immutable array using the specified comparer.

ToBuilder() ToBuilder() ToBuilder() ToBuilder()

建立可變動的陣列,其具有與此陣列相同的內容,而且能夠使用標準變動介面,有效率地跨多個作業進行變動。Creates a mutable array that has the same contents as this array and can be efficiently mutated across multiple operations using standard mutable interfaces.

運算子

Equality(ImmutableArray<T>, ImmutableArray<T>) Equality(ImmutableArray<T>, ImmutableArray<T>) Equality(ImmutableArray<T>, ImmutableArray<T>) Equality(ImmutableArray<T>, ImmutableArray<T>)

傳回值,這個值指出兩個陣列是否相等。Returns a value that indicates if two arrays are equal.

Equality(Nullable<ImmutableArray<T>>, Nullable<ImmutableArray<T>>) Equality(Nullable<ImmutableArray<T>>, Nullable<ImmutableArray<T>>) Equality(Nullable<ImmutableArray<T>>, Nullable<ImmutableArray<T>>) Equality(Nullable<ImmutableArray<T>>, Nullable<ImmutableArray<T>>)

傳回值,這個值指出兩個陣列是否相等。Returns a value that indicates if two arrays are equal.

Inequality(ImmutableArray<T>, ImmutableArray<T>) Inequality(ImmutableArray<T>, ImmutableArray<T>) Inequality(ImmutableArray<T>, ImmutableArray<T>) Inequality(ImmutableArray<T>, ImmutableArray<T>)

傳回值,這個值指出兩個陣列是否不相等。Returns a value that indicates whether two arrays are not equal.

Inequality(Nullable<ImmutableArray<T>>, Nullable<ImmutableArray<T>>) Inequality(Nullable<ImmutableArray<T>>, Nullable<ImmutableArray<T>>) Inequality(Nullable<ImmutableArray<T>>, Nullable<ImmutableArray<T>>) Inequality(Nullable<ImmutableArray<T>>, Nullable<ImmutableArray<T>>)

檢查兩個陣列間的不相等。Checks for inequality between two array.

明確介面實作

ICollection<T>.Add(T) ICollection<T>.Add(T) ICollection<T>.Add(T) ICollection<T>.Add(T)

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

ICollection<T>.Clear() ICollection<T>.Clear() ICollection<T>.Clear() ICollection<T>.Clear()

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

ICollection<T>.Count ICollection<T>.Count ICollection<T>.Count ICollection<T>.Count

取得集合的陣列數目。Gets the number of array in the collection.

ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly

取得值,這個值指出這個執行個體是否為唯讀。Gets a value indicating whether this instance is read only.

ICollection<T>.Remove(T) ICollection<T>.Remove(T) ICollection<T>.Remove(T) ICollection<T>.Remove(T)

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

IEnumerable<T>.GetEnumerator() IEnumerable<T>.GetEnumerator() IEnumerable<T>.GetEnumerator() IEnumerable<T>.GetEnumerator()

傳回可逐一查看陣列的列舉程式。Returns an enumerator that iterates through the array.

IList<T>.Insert(Int32, T) IList<T>.Insert(Int32, T) IList<T>.Insert(Int32, T) IList<T>.Insert(Int32, T)

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

IList<T>.Item[Int32] IList<T>.Item[Int32] IList<T>.Item[Int32] IList<T>.Item[Int32]

取得或設定唯讀清單中指定索引處的項目。Gets or sets the element at the specified index in the read-only list.

IList<T>.RemoveAt(Int32) IList<T>.RemoveAt(Int32) IList<T>.RemoveAt(Int32) IList<T>.RemoveAt(Int32)

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

IReadOnlyCollection<T>.Count IReadOnlyCollection<T>.Count IReadOnlyCollection<T>.Count IReadOnlyCollection<T>.Count

取得集合的陣列數目。Gets the number of array in the collection.

IReadOnlyList<T>.Item[Int32] IReadOnlyList<T>.Item[Int32] IReadOnlyList<T>.Item[Int32] IReadOnlyList<T>.Item[Int32]

取得位在指定索引處的元素。Gets the element at the specified index.

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

從指定的索引處開始,將這個陣列複製到其他陣列。Copies this array to another array starting at the specified index.

ICollection.Count ICollection.Count ICollection.Count ICollection.Count

取得陣列的大小。Gets the size of the array.

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

請參閱 ICollection 介面。See the ICollection interface.

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

取得同步處理根項目。Gets the sync root.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

傳回可逐一查看不可變陣列的列舉程式。Returns an enumerator that iterates through the immutable array.

IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

IList.Clear() IList.Clear() IList.Clear() IList.Clear()

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

取得指定索引處的值。Gets the value at the specified index.

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

取得值,指出此執行個體是否有固定的大小。Gets a value indicating whether this instance is fixed size.

IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly

取得值,這個值指出這個執行個體是否為唯讀。Gets a value indicating whether this instance is read only.

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

取得或設定在指定索引處的 ObjectGets or sets the Object at the specified index.

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32)

在所有情況下都會擲回 NotSupportedExceptionThrows NotSupportedException in all cases.

IImmutableList<T>.Add(T) IImmutableList<T>.Add(T) IImmutableList<T>.Add(T) IImmutableList<T>.Add(T)

傳回已在結尾處加入指定項目的原始陣列複本。Returns a copy of the original array with the specified item added to the end.

IImmutableList<T>.AddRange(IEnumerable<T>) IImmutableList<T>.AddRange(IEnumerable<T>) IImmutableList<T>.AddRange(IEnumerable<T>) IImmutableList<T>.AddRange(IEnumerable<T>)

傳回已在陣列結尾處加入指定項目的原始陣列複本。Returns a copy of the original array with the specified elements added to the end of the array.

IImmutableList<T>.Clear() IImmutableList<T>.Clear() IImmutableList<T>.Clear() IImmutableList<T>.Clear()

傳回已移除所有項目的陣列。Returns an array with all the elements removed.

IImmutableList<T>.Insert(Int32, T) IImmutableList<T>.Insert(Int32, T) IImmutableList<T>.Insert(Int32, T) IImmutableList<T>.Insert(Int32, T)

傳回已在指定位置插入指定值的新陣列。Returns a new array with the specified value inserted at the specified position.

IImmutableList<T>.InsertRange(Int32, IEnumerable<T>) IImmutableList<T>.InsertRange(Int32, IEnumerable<T>) IImmutableList<T>.InsertRange(Int32, IEnumerable<T>) IImmutableList<T>.InsertRange(Int32, IEnumerable<T>)

在指定的索引處插入指定的值。Inserts the specified values at the specified index

IImmutableList<T>.Remove(T, IEqualityComparer<T>) IImmutableList<T>.Remove(T, IEqualityComparer<T>) IImmutableList<T>.Remove(T, IEqualityComparer<T>) IImmutableList<T>.Remove(T, IEqualityComparer<T>)

傳回已從陣列中移除第一個出現之指定項目的陣列,如果找不到相符項目,則會傳回目前的陣列。Returns an array with the first occurrence of the specified element removed from the array; if no match is found, the current array is returned.

IImmutableList<T>.RemoveAll(Predicate<T>) IImmutableList<T>.RemoveAll(Predicate<T>) IImmutableList<T>.RemoveAll(Predicate<T>) IImmutableList<T>.RemoveAll(Predicate<T>)

從陣列中移除符合指定條件的所有項目。Removes all the items from the array that meet the specified condition.

IImmutableList<T>.RemoveAt(Int32) IImmutableList<T>.RemoveAt(Int32) IImmutableList<T>.RemoveAt(Int32) IImmutableList<T>.RemoveAt(Int32)

傳回已移除指定位置處之項目的陣列。Returns an array with the element at the specified position removed.

IImmutableList<T>.RemoveRange(IEnumerable<T>, IEqualityComparer<T>) IImmutableList<T>.RemoveRange(IEnumerable<T>, IEqualityComparer<T>) IImmutableList<T>.RemoveRange(IEnumerable<T>, IEqualityComparer<T>) IImmutableList<T>.RemoveRange(IEnumerable<T>, IEqualityComparer<T>)

從這個陣列中移除指定的項目。Removes the specified items from this array.

IImmutableList<T>.RemoveRange(Int32, Int32) IImmutableList<T>.RemoveRange(Int32, Int32) IImmutableList<T>.RemoveRange(Int32, Int32) IImmutableList<T>.RemoveRange(Int32, Int32)

傳回已移除指定位置處之項目的陣列。Returns an array with the elements at the specified position removed.

IImmutableList<T>.Replace(T, T, IEqualityComparer<T>) IImmutableList<T>.Replace(T, T, IEqualityComparer<T>) IImmutableList<T>.Replace(T, T, IEqualityComparer<T>) IImmutableList<T>.Replace(T, T, IEqualityComparer<T>)

尋找陣列中第一個等於指定值的項目,並使用指定的新值來取代該值。Finds the first element in the array equal to the specified value and replaces the value with the specified new value.

IImmutableList<T>.SetItem(Int32, T) IImmutableList<T>.SetItem(Int32, T) IImmutableList<T>.SetItem(Int32, T) IImmutableList<T>.SetItem(Int32, T)

以指定的項目取代位於指定索引上的項目。Replaces the item at the specified index with the specified item.

IStructuralComparable.CompareTo(Object, IComparer) IStructuralComparable.CompareTo(Object, IComparer) IStructuralComparable.CompareTo(Object, IComparer) IStructuralComparable.CompareTo(Object, IComparer)

判斷目前的集合項目在排序次序中位於另一個項目之前、相同位置或之後。Determines whether the current collection element precedes, occurs in the same position as, or follows another element in the sort order.

IStructuralEquatable.Equals(Object, IEqualityComparer) IStructuralEquatable.Equals(Object, IEqualityComparer) IStructuralEquatable.Equals(Object, IEqualityComparer) IStructuralEquatable.Equals(Object, IEqualityComparer)

判斷這個陣列在結構上是否等於指定的陣列。Determines whether this array is structurally equal to the specified array.

IStructuralEquatable.GetHashCode(IEqualityComparer) IStructuralEquatable.GetHashCode(IEqualityComparer) IStructuralEquatable.GetHashCode(IEqualityComparer) IStructuralEquatable.GetHashCode(IEqualityComparer)

傳回目前執行個體的雜湊碼。Returns a hash code for the current instance.

擴充方法

BinarySearch<T>(ImmutableArray<T>, T) BinarySearch<T>(ImmutableArray<T>, T) BinarySearch<T>(ImmutableArray<T>, T) BinarySearch<T>(ImmutableArray<T>, T)

使用預設的比較子搜尋指定項目已排序的不可變陣列,並在找到時,傳回該項目以零為起始的索引。Searches the sorted immutable array for a specified element using the default comparer and returns the zero-based index of the element, if it's found.

BinarySearch<T>(ImmutableArray<T>, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, T, IComparer<T>)

搜尋指定項目已排序的不可變陣列,並在找到時,傳回該項目以零為起始的索引。Searches a sorted immutable array for a specified element and returns the zero-based index of the element, if it's found.

BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T)

搜尋指定項目已排序的不可變陣列,並在找到時,傳回該項目以零為起始的索引。Searches a sorted immutable array for a specified element and returns the zero-based index of the element, if it's found.

BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T, IComparer<T>)

搜尋指定項目已排序的不可變陣列,並傳回該項目以零為起始的索引。Searches a sorted immutable array for a specified element and returns the zero-based index of the element.

IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T)

搜尋指定的物件,並傳回清單中第一個出現項目以零為起始的索引。Searches for the specified object and returns the zero-based index of the first occurrence within the list.

IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>)

搜尋指定的物件,並傳回清單中第一個出現項目以零為起始的索引。Searches for the specified object and returns the zero-based index of the first occurrence within the list.

IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32)

搜尋指定的物件,並傳回不可變的清單中,從指定索引開始到最後一個項目的項目範圍內,第一個出現項目以零為起始的索引。Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element.

IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32)

搜尋指定的物件,並傳回不可變的清單中,從指定索引開始到最後一個項目的項目範圍內,第一個出現項目以零為起始的索引。Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element.

LastIndexOf<T>(IImmutableList<T>, T) LastIndexOf<T>(IImmutableList<T>, T) LastIndexOf<T>(IImmutableList<T>, T) LastIndexOf<T>(IImmutableList<T>, T)

搜尋指定的物件,並傳回整個不可變的清單中最後一個出現項目以零為起始的索引。Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list.

LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>)

搜尋指定的物件,並傳回整個不可變的清單中最後一個出現項目以零為起始的索引。Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list.

LastIndexOf<T>(IImmutableList<T>, T, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32)

搜尋指定的物件,並傳回不可變的清單中,從第一個項目開始到指定索引的項目範圍內,最後一個出現項目以零為起始的索引。Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index.

LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32)

搜尋指定的物件,並傳回不可變的清單中,從第一個項目開始到指定索引的項目範圍內,最後一個出現項目以零為起始的索引。Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index.

Remove<T>(IImmutableList<T>, T) Remove<T>(IImmutableList<T>, T) Remove<T>(IImmutableList<T>, T) Remove<T>(IImmutableList<T>, T)

從這個清單中移除指定的值。Removes the specified value from this list.

RemoveRange<T>(IImmutableList<T>, IEnumerable<T>) RemoveRange<T>(IImmutableList<T>, IEnumerable<T>) RemoveRange<T>(IImmutableList<T>, IEnumerable<T>) RemoveRange<T>(IImmutableList<T>, IEnumerable<T>)

從這個清單中移除指定的值。Removes the specified values from this list.

Replace<T>(IImmutableList<T>, T, T) Replace<T>(IImmutableList<T>, T, T) Replace<T>(IImmutableList<T>, T, T) Replace<T>(IImmutableList<T>, T, T)

使用指定的項目,來取代清單中第一個相等的項目。Replaces the first equal element in the list with the specified element.

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

根據輸入 DataTable 物件 (其中泛型參數 TDataRow) 傳回包含 IEnumerable<T> 物件複本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

Aggregate<T>(ImmutableArray<T>, Func<T,T,T>) Aggregate<T>(ImmutableArray<T>, Func<T,T,T>) Aggregate<T>(ImmutableArray<T>, Func<T,T,T>) Aggregate<T>(ImmutableArray<T>, Func<T,T,T>)

以累加的方式套用函式到序列的元素。Applies a function to a sequence of elements in a cumulative way.

Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>) Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>) Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>) Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>)

以累加的方式套用函式到序列的元素。Applies a function to a sequence of elements in a cumulative way.

Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>) Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>) Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>) Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>)

以累加的方式套用函式到序列的元素。Applies a function to a sequence of elements in a cumulative way.

All<T>(ImmutableArray<T>, Func<T,Boolean>) All<T>(ImmutableArray<T>, Func<T,Boolean>) All<T>(ImmutableArray<T>, Func<T,Boolean>) All<T>(ImmutableArray<T>, Func<T,Boolean>)

取得值,該值指示此陣列中的所有元素是否符合指定條件。Gets a value indicating whether all elements in this array match a given condition.

Any<T>(ImmutableArray<T>) Any<T>(ImmutableArray<T>) Any<T>(ImmutableArray<T>) Any<T>(ImmutableArray<T>)

取得值,該值指示此陣列中是否包含任何元素。Gets a value indicating whether the array contains any elements.

Any<T>(ImmutableArray<T>, Func<T,Boolean>) Any<T>(ImmutableArray<T>, Func<T,Boolean>) Any<T>(ImmutableArray<T>, Func<T,Boolean>) Any<T>(ImmutableArray<T>, Func<T,Boolean>)

取得值,該值指示此陣列中是否包含任何符合指定條件的元素。Gets a value indicating whether the array contains any elements that match a specified condition.

ElementAt<T>(ImmutableArray<T>, Int32) ElementAt<T>(ImmutableArray<T>, Int32) ElementAt<T>(ImmutableArray<T>, Int32) ElementAt<T>(ImmutableArray<T>, Int32)

傳回位於陣列中指定索引處的元素。Returns the element at a specified index in the array.

ElementAtOrDefault<T>(ImmutableArray<T>, Int32) ElementAtOrDefault<T>(ImmutableArray<T>, Int32) ElementAtOrDefault<T>(ImmutableArray<T>, Int32) ElementAtOrDefault<T>(ImmutableArray<T>, Int32)

傳回位於序列中指定索引處的元素;如果索引超出範圍,則傳回預設值。Returns the element at a specified index in a sequence or a default value if the index is out of range.

First<T>(ImmutableArray<T>) First<T>(ImmutableArray<T>) First<T>(ImmutableArray<T>) First<T>(ImmutableArray<T>)

傳回陣列中第一個元素。Returns the first element in an array.

First<T>(ImmutableArray<T>, Func<T,Boolean>) First<T>(ImmutableArray<T>, Func<T,Boolean>) First<T>(ImmutableArray<T>, Func<T,Boolean>) First<T>(ImmutableArray<T>, Func<T,Boolean>)

傳回序列中符合指定條件的第一個元素。Returns the first element in a sequence that satisfies a specified condition.

FirstOrDefault<T>(ImmutableArray<T>) FirstOrDefault<T>(ImmutableArray<T>) FirstOrDefault<T>(ImmutableArray<T>) FirstOrDefault<T>(ImmutableArray<T>)

傳回序列的第一個元素;如果序列中沒有包含任何元素,則傳回預設值。Returns the first element of a sequence, or a default value if the sequence contains no elements.

FirstOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) FirstOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) FirstOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) FirstOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>)

傳回序列中符合條件的第一個元素;如果找不到這類元素,則傳回預設值。Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.

Last<T>(ImmutableArray<T>) Last<T>(ImmutableArray<T>) Last<T>(ImmutableArray<T>) Last<T>(ImmutableArray<T>)

傳回陣列的最後一個元素。Returns the last element of the array.

Last<T>(ImmutableArray<T>, Func<T,Boolean>) Last<T>(ImmutableArray<T>, Func<T,Boolean>) Last<T>(ImmutableArray<T>, Func<T,Boolean>) Last<T>(ImmutableArray<T>, Func<T,Boolean>)

傳回序列中符合指定之條件的最後一個元素。Returns the last element of a sequence that satisfies a specified condition.

LastOrDefault<T>(ImmutableArray<T>) LastOrDefault<T>(ImmutableArray<T>) LastOrDefault<T>(ImmutableArray<T>) LastOrDefault<T>(ImmutableArray<T>)

傳回序列的最後一個元素;如果序列中沒有包含任何元素,則傳回預設值。Returns the last element of a sequence, or a default value if the sequence contains no elements.

LastOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) LastOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) LastOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) LastOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>)

傳回序列中符合條件的最後一個元素;如果找不到這類元素,則傳回預設值。Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.

Select<T,TResult>(ImmutableArray<T>, Func<T,TResult>) Select<T,TResult>(ImmutableArray<T>, Func<T,TResult>) Select<T,TResult>(ImmutableArray<T>, Func<T,TResult>) Select<T,TResult>(ImmutableArray<T>, Func<T,TResult>)

將序列的每個元素規劃成一個新的表單。Projects each element of a sequence into a new form.

Single<T>(ImmutableArray<T>) Single<T>(ImmutableArray<T>) Single<T>(ImmutableArray<T>) Single<T>(ImmutableArray<T>)

傳回序列的唯一一個元素,如果序列中不是正好一個元素,則擲回例外狀況。Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.

Single<T>(ImmutableArray<T>, Func<T,Boolean>) Single<T>(ImmutableArray<T>, Func<T,Boolean>) Single<T>(ImmutableArray<T>, Func<T,Boolean>) Single<T>(ImmutableArray<T>, Func<T,Boolean>)

傳回序列中符合指定之條件的唯一一個元素,如果有一個以上這類元素,則擲回例外狀況。Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.

SingleOrDefault<T>(ImmutableArray<T>) SingleOrDefault<T>(ImmutableArray<T>) SingleOrDefault<T>(ImmutableArray<T>) SingleOrDefault<T>(ImmutableArray<T>)

傳回陣列的唯一一個元素,如果序列是空白,則為預設值,如果序列中有一個以上的元素,這個方法就會擲回例外狀況。Returns the only element of the array, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.

SingleOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) SingleOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) SingleOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) SingleOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>)

傳回序列中符合指定之條件的唯一一個元素,如果沒有這類元素,則為預設值,如果有一個以上的元素符合條件,這個方法就會擲回例外狀況。Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.

ToArray<T>(ImmutableArray<T>) ToArray<T>(ImmutableArray<T>) ToArray<T>(ImmutableArray<T>) ToArray<T>(ImmutableArray<T>)

將此陣列的內容複製到可變動的陣列。Copies the contents of this array to a mutable array.

ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>)

根據此陣列的內容建立字典。Creates a dictionary based on the contents of this array.

ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>, IEqualityComparer<TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>, IEqualityComparer<TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>, IEqualityComparer<TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>, IEqualityComparer<TKey>)

根據此陣列的內容建立字典。Creates a dictionary based on the contents of this array.

ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>)

根據此陣列的內容建立字典。Creates a dictionary based on the contents of this array.

ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>, IEqualityComparer<TKey>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>, IEqualityComparer<TKey>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>, IEqualityComparer<TKey>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>, IEqualityComparer<TKey>)

根據此陣列的內容建立字典。Creates a dictionary based on the contents of this array.

Where<T>(ImmutableArray<T>, Func<T,Boolean>) Where<T>(ImmutableArray<T>, Func<T,Boolean>) Where<T>(ImmutableArray<T>, Func<T,Boolean>) Where<T>(ImmutableArray<T>, Func<T,Boolean>)

根據述詞來篩選值序列。Filters a sequence of values based on a predicate.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>)

傳回包含來源集合中每個節點祖系的項目集合。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName)

傳回包含來源集合中每個節點祖系的已篩選項目集合。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目之子代節點的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>)

傳回包含來源集合中每個項目和文件之子代項目的項目集合。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName)

傳回已篩選的項目集合,其中包含來源集合中每個項目和文件的子代項目。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>)

傳回來源集合中每個項目和文件的子項目集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName)

傳回來源集合中每個項目和文件的已篩選子項目集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>)

傳回包含來源集合中所有節點的節點集合,依據文件順序來排序。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目的子節點集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

在來源集合中,從每一個節點的父節點移除這些節點。Removes every node in the source collection from its parent node.

適用於

執行緒安全性

此型別具備執行緒安全。This type is thread safe.