ImmutableList<T> ImmutableList<T> ImmutableList<T> ImmutableList<T> Class

定義

表示一個可以依照索引存取強式型別物件的不可變清單。Represents an immutable list, which is a strongly typed list of objects that can be accessed by index.

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

generic <typename T>
public ref class ImmutableList sealed : 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>
public sealed class ImmutableList<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>
type ImmutableList<'T> = class
    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 NotInheritable Class ImmutableList(Of T)
Implements ICollection(Of T), IEnumerable(Of T), IImmutableList(Of T), IList, IList(Of T), IReadOnlyCollection(Of T), IReadOnlyList(Of T)

類型參數

T

清單中項目的類型。The type of elements in the list.

繼承
ImmutableList<T>ImmutableList<T>ImmutableList<T>ImmutableList<T>
實作

備註

ImmutableList<T> 沒有公用建構函式;您會開始擷取空ImmutableList<T>使用ImmutableList<T>.EmptyImmutableList<T> has no public constructor; you begin by retrieving an empty ImmutableList<T> by using the ImmutableList<T>.Empty. 您可以接著呼叫方法,例如AddAddRange、 要填入集合。You can then call methods, such as Add and AddRange, to populate the collection. 請注意,這些方法會傳回新的物件。Note that these methods return a new object. 當您新增或移除不可變的清單中的項目時,並提出一份原始的清單項目加入或移除,原始清單會保持不變。When you add or remove items from an immutable list, a copy of the original list is made with the items added or removed, and the original list is unchanged.

欄位

Empty Empty Empty Empty

取得含有預設排序比較子的空集合。Gets an empty set with the default sort comparer.

屬性

Count Count Count Count

取得清單中所包含元素的數目。Gets the number of elements contained in the list.

IsEmpty IsEmpty IsEmpty IsEmpty

取得值,這個值指出清單是否為空。Gets a value that indicates whether this list is empty.

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

取得清單中指定索引處的元素。Gets the element at the specified index of the list.

方法

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

將指定的物件加入不可變清單的尾端。Adds the specified object to the end of the immutable list.

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

將指定集合的元素加入至不可變清單的尾端。Adds the elements of the specified collection to the end of the immutable list.

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

使用指定的比較子在已排序之清單內搜尋某範圍的元素,並傳回該元素以零為起始的索引。Searches a range of elements in the sorted list for an element using the specified comparer and returns the zero-based index of the element.

BinarySearch(T) BinarySearch(T) BinarySearch(T) BinarySearch(T)

使用預設的比較子並傳回元素以零為起始的索引,來搜尋整個已排序的清單的某個元素。Searches the entire sorted list for an element using the default comparer and returns the zero-based index of the element.

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

使用指定的比較子並傳回元素以零為起始的索引,來搜尋整個已排序的清單中的某個元素。Searches the entire sorted list for an element using the specified comparer and returns the zero-based index of the element.

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

從不可變清單中移除所有元素。Removes all elements from the immutable list.

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

判斷此不可變的清單是否包含指定的值。Determines whether this immutable list contains the specified value.

ConvertAll<TOutput>(Func<T,TOutput>) ConvertAll<TOutput>(Func<T,TOutput>) ConvertAll<TOutput>(Func<T,TOutput>) ConvertAll<TOutput>(Func<T,TOutput>)

將目前不可變清單中的元素轉換為另一種型別,並傳回包含已轉換元素的清單。Converts the elements in the current immutable list to another type, and returns a list containing the converted elements.

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

從目標陣列的指定索引處開始,從不可變清單中複製某範圍的元素到相容的一維陣列。Copies a range of elements from the immutable list to a compatible one-dimensional array, starting at the specified index of the target array.

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

從目標陣列的開頭開始,將整個不可變的清單複製到相容的一維陣列。Copies the entire immutable list to a compatible one-dimensional array, starting at the beginning of the target array.

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

從目標陣列的指定索引處開始,將整個不可變的清單複製到相容的一維陣列。Copies the entire immutable list to a compatible one-dimensional array, starting at the specified index of the target array.

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

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Exists(Predicate<T>) Exists(Predicate<T>) Exists(Predicate<T>) Exists(Predicate<T>)

判斷不可變的清單是否包含符合指定述詞所定義之條件的項目。Determines whether the immutable list contains elements that match the conditions defined by the specified predicate.

Find(Predicate<T>) Find(Predicate<T>) Find(Predicate<T>) Find(Predicate<T>)

搜尋符合指定述詞所定義之條件的項目,並傳回整個不可變清單內第一個出現的項目。Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire immutable list.

FindAll(Predicate<T>) FindAll(Predicate<T>) FindAll(Predicate<T>) FindAll(Predicate<T>)

擷取符合指定之述詞所定義的條件之所有項目。Retrieves all the elements that match the conditions defined by the specified predicate.

FindIndex(Int32, Int32, Predicate<T>) FindIndex(Int32, Int32, Predicate<T>) FindIndex(Int32, Int32, Predicate<T>) FindIndex(Int32, Int32, Predicate<T>)

搜尋符合指定述詞所定義之條件的項目,並傳回不可變的清單中,從指定索引開始且包含指定項目數的項目範圍內,第一個出現項目以零為起始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the immutable list that starts at the specified index and contains the specified number of elements.

FindIndex(Int32, Predicate<T>) FindIndex(Int32, Predicate<T>) FindIndex(Int32, Predicate<T>) FindIndex(Int32, Predicate<T>)

搜尋符合指定述詞所定義之條件的項目,並傳回不可變的清單中,從指定索引開始到最後一個項目的項目範圍內,第一個出現項目以零為起始的索引。Searches for an element that matches the conditions defined by the specified predicate, 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.

FindIndex(Predicate<T>) FindIndex(Predicate<T>) FindIndex(Predicate<T>) FindIndex(Predicate<T>)

搜尋符合指定述詞所定義之條件的項目,並傳回整個不可變清單內第一個出現項目之以零為起始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire immutable list.

FindLast(Predicate<T>) FindLast(Predicate<T>) FindLast(Predicate<T>) FindLast(Predicate<T>)

搜尋符合指定述詞所定義之條件的項目,並傳回整個不可變清單內最後一個出現的項目。Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire immutable list.

FindLastIndex(Int32, Int32, Predicate<T>) FindLastIndex(Int32, Int32, Predicate<T>) FindLastIndex(Int32, Int32, Predicate<T>) FindLastIndex(Int32, Int32, Predicate<T>)

搜尋符合指定述詞所定義之條件的項目,並傳回不可變的清單中,包含指定項目數且結束於指定索引的項目範圍內,最後一個出現項目以零為起始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the immutable list that contains the specified number of elements and ends at the specified index.

FindLastIndex(Int32, Predicate<T>) FindLastIndex(Int32, Predicate<T>) FindLastIndex(Int32, Predicate<T>) FindLastIndex(Int32, Predicate<T>)

搜尋符合指定述詞所定義之條件的項目,並傳回不可變的清單中,從第一個項目開始到指定索引的項目範圍內,最後一個出現項目以零為起始的索引。Searches for an element that matches the conditions defined by the specified predicate, 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.

FindLastIndex(Predicate<T>) FindLastIndex(Predicate<T>) FindLastIndex(Predicate<T>) FindLastIndex(Predicate<T>)

搜尋符合指定述詞所定義之條件的項目,並傳回整個不可變清單內最後一個出現項目以零為起始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire immutable list.

ForEach(Action<T>) ForEach(Action<T>) ForEach(Action<T>) ForEach(Action<T>)

在不可變清單的每一個元素上執行指定動作。Performs the specified action on each element of the immutable list.

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

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

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

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetRange(Int32, Int32) GetRange(Int32, Int32) GetRange(Int32, Int32) GetRange(Int32, Int32)

為來源不可變清單中的項目範圍建立淺層複本。Creates a shallow copy of a range of elements in the source immutable list.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
IndexOf(T) IndexOf(T) IndexOf(T) IndexOf(T)

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

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 for the specified object and returns the zero-based index of the first occurrence within the range of elements in the list that starts at the specified index and contains the specified number of elements.

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

將指定的物件插入至不可變清單的指定索引處。Inserts the specified object into the immutable list at the specified index.

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

將集合的項目插入不可變清單的指定索引處。Inserts the elements of a collection into the immutable list at the specified index.

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

取得在集合的元素的唯讀參考給定indexGets a read-only reference to the element of the set at the given index.

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 for the specified object and returns the zero-based index of the last occurrence within the range of elements in the list that contains the specified number of elements and ends at the specified index.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(T) Remove(T) Remove(T) Remove(T)

從這個不可變清單中移除指定物件的第一個符合元素。Removes the first occurrence of the specified object from this immutable list.

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

從這個不可變清單中移除第一個符合指定值的物件。Removes the first occurrence of the object that matches the specified value from this immutable list.

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

移除符合指定的述詞所定義之條件的所有項目。Removes all the elements that match the conditions defined by the specified predicate.

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

移除指定索引中的項目。Removes the element at the specified index.

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

從這個不可變清單移除一個範圍的元素。Removes a range of elements from this immutable list.

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

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

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

從不可變清單中移除某範圍的元素,從指定的索引開始,並且包含指定數目的元素。Removes a range of elements, starting from the specified index and containing the specified number of elements, from this immutable list.

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

在不可變清單中以新元素取代指定元素。Replaces the specified element in the immutable list with a new element.

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

在不可變清單中以新元素取代指定元素。Replaces the specified element in the immutable list with a new element.

Reverse() Reverse() Reverse() Reverse()

反轉整個不可變清單中項目的順序。Reverses the order of the elements in the entire immutable list.

Reverse(Int32, Int32) Reverse(Int32, Int32) Reverse(Int32, Int32) Reverse(Int32, Int32)

反轉不可變清單之指定範圍中項目的順序。Reverses the order of the elements in the specified range of the immutable list.

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

以指定元素取代不可變清單中指定位置的元素。Replaces an element at a given position in the immutable list with the specified element.

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

使用預設的比較子來排序整個不可變清單中的元素。Sorts the elements in the entire immutable list using the default comparer.

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

使用指定的比較子來排序整個不可變清單中的元素。Sorts the elements in the entire immutable list using the specified comparer.

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

使用指定的比較子來排序整個不可變清單中的元素。Sorts the elements in the entire immutable list using the specified comparer.

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

使用指定的比較子來排序不可變清單某範圍內的元素。Sorts a range of elements in the immutable list using the specified comparer.

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

建立與此清單 (能夠使用標準變動介面,有效率地跨多個作業進行變動) 內容相同之清單。Creates a list that has the same contents as this list and can be efficiently mutated across multiple operations using standard mutable interfaces.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
TrueForAll(Predicate<T>) TrueForAll(Predicate<T>) TrueForAll(Predicate<T>) TrueForAll(Predicate<T>)

判斷不可變清單中的每一個項目是否符合指定述詞所定義的條件。Determines whether every element in the immutable list matches the conditions defined by the specified predicate.

明確介面實作

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

從指定的陣列索引處開始,將整個不可變的清單複製到相容的一維陣列。Copies the entire immutable list to a compatible one-dimensional array, starting at the specified array index.

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

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

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

請參閱 ICollectionSee ICollection.

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

將指定的項目加入至不可變的清單。Adds the specified item to the immutable list.

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

從不可變的清單中移除所有項目。Removes all items from the immutable list.

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

取得值,指出 ICollection<T> 是否唯讀。Gets a value indicating whether the ICollection<T> is read-only.

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

從不可變的清單中移除第一個出現的特定物件。Removes the first occurrence of a specific object from the immutable list.

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

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

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

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

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

將指定的值加入至這個不可變清單。Adds the specified value to this immutable list.

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

將指定的值加入至這個不可變清單。Adds the specified values to this immutable list.

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

擷取空的清單,這個清單的排序及順序語意與這個執行個體相同。Retrieves an empty list that has the same sorting and ordering semantics as this instance.

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

將指定的項目插入至不可變清單中的指定索引處。Inserts the specified element at the specified index in the immutable list.

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 elements at the specified index in the immutable list.

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

從清單中移除具有特定值的元素。Removes the element with the specified value from the list.

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

移除符合指定的述詞所定義之條件的所有項目。Removes all the elements that match the conditions defined by the specified predicate.

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

移除不可變清單之指定索引處的項目。Removes the element at the specified index of the immutable list.

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 a range of elements from this immutable list that match the items specified.

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

從這個清單中的指定位置移除指定數目的元素。Removes the specified number of elements at the specified location from this list.

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>)

使用指定的元素取代清單中的元素。Replaces an element in the list with the specified element.

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

使用指定的項目取代清單中指定位置的項目。Replaces an element in the list at a given position with the specified element.

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

將項目加入不可變的清單中。Adds an item to the immutable list.

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

從不可變的清單中移除所有項目。Removes all items from the immutable list.

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

判斷不可變的清單是否包含特定值。Determines whether the immutable list contains a specific value.

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

判斷不可變清單中特定項目的索引。Determines the index of a specific item in the immutable list.

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

將項目插入至不可變清單的指定索引處。Inserts an item into the immutable list at the specified index.

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

取得值,指出 IList 是否有固定的大小。Gets a value indicating whether the IList has a fixed size.

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

取得值,指出 ICollection<T> 是否唯讀。Gets a value indicating whether the ICollection<T> 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)

從不可變的清單中移除第一個出現的特定物件。Removes the first occurrence of a specific object from the immutable list.

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

移除位於不可變清單之指定索引處的項目。Removes the item at the specified index of the immutable list.

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

將物件插入至不可變清單的指定索引處。Inserts an object in the immutable list at the specified index.

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

取得或設定指定之索引處的值。Gets or sets the value at the specified index.

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

移除在指定索引處的值。Removes the value at the specified index.

Extension Methods

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,其中包含副本DataRow物件,指定輸入IEnumerable<T>物件其中泛型參數TDataRowReturns 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至指定的物件DataTable,根據輸入IEnumerable<T>物件其中泛型參數TDataRowCopies 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至指定的物件DataTable,根據輸入IEnumerable<T>物件其中泛型參數TDataRowCopies 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.

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

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

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

將轉換IEnumerableIQueryableConverts 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.