System.Collections.Immutable Provides a set of initialization methods for instances of the class. Creates a from an according to specified key selector function. An from which to create a . A function to extract a key from each element. An to compare keys. The type of the elements of . The type of the key returned by . A that contains the keys and values selected from the input sequence. Creates a with the specified key/value pairs. The key/value pairs to use to populate the dictionary. The comparer implementation to use to compare keys for equality. If , is used. The type of the keys in the dictionary. The type of the values in the dictionary. A that contains the specified keys and values. Creates a from an according to specified key selector and element selector functions. An from which to create a . A function to extract a key from each element. A transform function to produce a result element value from each element. An to compare keys. The type of the elements of . The type of the key returned by . The type of the value returned by . A that contains the keys and values selected from the input sequence. Provides an immutable, read-only dictionary optimized for fast lookup and enumeration. The type of the keys in the dictionary. The type of the values in this dictionary. Determines whether the dictionary contains the specified key. The key to locate in the dictionary. if the dictionary contains an element with the specified key; otherwise, . Copies the elements of the dictionary to an array of type , starting at the specified . The array that is the destination of the elements copied from the dictionary. The zero-based index in at which copying begins. Copies the elements of the dictionary to a span of type . The span that is the destination of the elements copied from the dictionary. Returns an enumerator that iterates through the dictionary. An enumerator that iterates through the dictionary. Gets either a reference to a in the dictionary or a reference if the key does not exist in the dictionary. The key used for lookup. A reference to a in the dictionary or a reference if the key does not exist in the dictionary. Adds an item to the . The object to add to the . Removes all items from the . Determines whether the contains a specific value. The object to locate in the . if is found in the ; otherwise, . Removes the first occurrence of a specific object from the . The object to remove from the . if was successfully removed from the ; otherwise, . This method also returns if is not found in the original . Adds an element with the provided key and value to the . The object to use as the key of the element to add. The object to use as the value of the element to add. Removes the element with the specified key from the . The key of the element to remove. if the element is successfully removed; otherwise, . This method also returns if was not found in the original . Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in array at which copying begins. Adds an element with the provided key and value to the object. The to use as the key of the element to add. The to use as the value of the element to add. Removes all elements from the object. Determines whether the object contains an element with the specified key. The key to locate in the object. true if the contains an element with the key; otherwise, false. Returns an object for the object. An object for the object. Removes the element with the specified key from the object. The key of the element to remove. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Gets the value associated with the specified key. The key of the value to get. When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of . if the dictionary contains an element with the specified key; otherwise, . Gets the comparer used by this dictionary. Gets the number of key/value pairs contained in the dictionary. Gets an empty . Gets a reference to the value associated with the specified key. The key of the value to get. does not exist in the collection. A reference to the value associated with the specified key. Gets a collection containing the keys in the dictionary. Gets a value indicating whether the is read-only. if the is read-only; otherwise, . Gets or sets the element with the specified key. The key of the element to get or set. The element with the specified key. Gets an containing the keys of the . An containing the keys of the object that implements . Gets an containing the values in the . An containing the values in the object that implements . Gets the element that has the specified key in the read-only dictionary. The key to locate. The element that has the specified key in the read-only dictionary. Gets an enumerable collection that contains the keys in the read-only dictionary. An enumerable collection that contains the keys in the read-only dictionary. Gets an enumerable collection that contains the values in the read-only dictionary. An enumerable collection that contains the values in the read-only dictionary. Gets a value indicating whether access to the is synchronized (thread safe). true if access to the is synchronized (thread safe); otherwise, false. Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . Gets a value indicating whether the object has a fixed size. true if the object has a fixed size; otherwise, false. Gets a value indicating whether the object is read-only. true if the object is read-only; otherwise, false. Gets or sets the element with the specified key. The key of the element to get or set. The element with the specified key, or null if the key does not exist. Gets an object containing the keys of the object. An object containing the keys of the object. Gets an object containing the values in the object. An object containing the values in the object. Gets a collection containing the values in the dictionary. Enumerates the elements of a . Advances the enumerator to the next element of the collection. true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. Sets the enumerator to its initial position, which is before the first element in the collection. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. Provides a set of initialization methods for instances of the class. Creates a with the specified values. The values to use to populate the set. The comparer implementation to use to compare values for equality. If , is used. The type of the values in the set. A frozen set. Provides an immutable, read-only set optimized for fast lookup and enumeration. The type of the values in this set. Determines whether the set contains the specified element. The element to locate. if the set contains the specified element; otherwise, . Copies the values in the set to an array, starting at the specified . The array that is the destination of the values copied from the set. The zero-based index in at which copying begins. Copies the values in the set to a span. The span that is the destination of the values copied from the set. Returns an enumerator that iterates through the set. An enumerator that iterates through the set. Determines whether the current set is a proper (strict) subset of a specified collection. The collection to compare to the current set. true if the current set is a proper subset of other; otherwise, false. Determines whether the current set is a proper (strict) superset of a specified collection. The collection to compare to the current set. true if the current set is a proper superset of other; otherwise, false. Determines whether a set is a subset of a specified collection. The collection to compare to the current set. true if the current set is a subset of other; otherwise, false. Determines whether the current set is a superset of a specified collection. The collection to compare to the current set. true if the current set is a superset of other; otherwise, false. Determines whether the current set overlaps with the specified collection. The collection to compare to the current set. true if the current set and other share at least one common element; otherwise, false. Determines whether the current set and the specified collection contain the same elements. The collection to compare to the current set. true if the current set is equal to other; otherwise, false. Adds an item to the . The object to add to the . Removes all items from the . Removes the first occurrence of a specific object from the . The object to remove from the . if was successfully removed from the ; otherwise, . This method also returns if is not found in the original . Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Adds an element to the current set and returns a value to indicate if the element was successfully added. The element to add to the set. if the element is added to the set; if the element is already in the set. Removes all elements in the specified collection from the current set. The collection of items to remove from the set. Modifies the current set so that it contains only elements that are also in a specified collection. The collection to compare to the current set. Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. The collection to compare to the current set. Modifies the current set so that it contains all elements that are present in the current set, in the specified collection, or in both. The collection to compare to the current set. Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in array at which copying begins. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Searches the set for a given value and returns the equal value it finds, if any. The value to search for. The value from the set that the search found, or the default value of T when the search yielded no match. A value indicating whether the search was successful. Gets the comparer used by this set. Gets the number of values contained in the set. Gets an empty . Gets a collection containing the values in the set. Gets a value indicating whether the is read-only. if the is read-only; otherwise, . Gets a value indicating whether access to the is synchronized (thread safe). true if access to the is synchronized (thread safe); otherwise, false. Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . Enumerates the values of a . Advances the enumerator to the next element of the collection. true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. Sets the enumerator to its initial position, which is before the first element in the collection. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. Represents an immutable collection of key/value pairs. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of keys in the dictionary. The type of values in the dictionary. Adds an element with the specified key and value to the dictionary. The key of the element to add. The value of the element to add. The given key already exists in the dictionary but has a different value. A new immutable dictionary that contains the additional key/value pair. Adds the specified key/value pairs to the dictionary. The key/value pairs to add. One of the given keys already exists in the dictionary but has a different value. A new immutable dictionary that contains the additional key/value pairs. Retrieves an empty dictionary that has the same ordering and key/value comparison rules as this dictionary instance. An empty dictionary with equivalent ordering and key/value comparison rules. Determines whether the immutable dictionary contains the specified key/value pair. The key/value pair to locate. if the specified key/value pair is found in the dictionary; otherwise, . Removes the element with the specified key from the immutable dictionary. The key of the element to remove. A new immutable dictionary with the specified element removed; or this instance if the specified key cannot be found in the dictionary. Removes the elements with the specified keys from the immutable dictionary. The keys of the elements to remove. A new immutable dictionary with the specified keys removed; or this instance if the specified keys cannot be found in the dictionary. Sets the specified key and value in the immutable dictionary, possibly overwriting an existing value for the key. The key of the entry to add. The key value to set. A new immutable dictionary that contains the specified key/value pair. Sets the specified key/value pairs in the immutable dictionary, possibly overwriting existing values for the keys. The key/value pairs to set in the dictionary. If any of the keys already exist in the dictionary, this method will overwrite their previous values. A new immutable dictionary that contains the specified key/value pairs. Determines whether this dictionary contains a specified key. The key to search for. The matching key located in the dictionary if found, or equalkey if no match is found. if a match for is found; otherwise, . Represents a list of elements that cannot be modified. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of elements in the list. Makes a copy of the list, and adds the specified object to the end of the copied list. The object to add to the list. A new list with the object added. Makes a copy of the list and adds the specified objects to the end of the copied list. The objects to add to the list. A new list with the elements added. Creates a list with all the items removed, but with the same sorting and ordering semantics as this list. An empty list that has the same sorting and ordering semantics as this instance. Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the that starts at the specified index and contains the specified number of elements. The object to locate in the . This value can be null for reference types. The zero-based starting indexes of the search. 0 (zero) is valid in an empty list. The number of elements in the section to search. The equality comparer to use to locate . The zero-based index of the first occurrence of within the range of elements in the that starts at and contains number of elements if found; otherwise -1. Inserts the specified element at the specified index in the immutable list. The zero-based index at which to insert the value. The object to insert. A new immutable list that includes the specified element. Inserts the specified elements at the specified index in the immutable list. The zero-based index at which the new elements should be inserted. The elements to insert. A new immutable list that includes the specified elements. Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the that contains the specified number of elements and ends at the specified index. The object to locate in the list. The value can be for reference types. The zero-based starting index of the search. 0 (zero) is valid in an empty list. The number of elements in the section to search. The equality comparer to match . Returns . Removes the first occurrence of a specified object from this immutable list. The object to remove from the list. The equality comparer to use to locate . A new list with the specified object removed. Removes all the elements that match the conditions defined by the specified predicate. The delegate that defines the conditions of the elements to remove. A new immutable list with the elements removed. Removes the element at the specified index of the immutable list. The index of the element to remove. A new list with the element removed. Removes the specified object from the list. The objects to remove from the list. The equality comparer to use to determine if match any objects in the list. A new immutable list with the specified objects removed, if matched objects in the list. Removes a range of elements from the . The zero-based starting index of the range of elements to remove. The number of elements to remove. A new immutable list with the elements removed. Returns a new list with the first matching element in the list replaced with the specified element. The element to be replaced. The element to replace the first occurrence of with. The equality comparer to use for matching . does not exist in the list. A new list that contains , even if is the same as . Replaces an element in the list at a given position with the specified element. The position in the list of the element to replace. The element to replace the old element with. A new list that contains the new element, even if the element at the specified location is the same as the new element. Represents an immutable first-in, first-out collection of objects. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of elements in the queue. Returns a new queue with all the elements removed. An empty immutable queue. Removes the first element in the immutable queue, and returns the new queue. The queue is empty. The new immutable queue with the first element removed. This value is never . Adds an element to the end of the immutable queue, and returns the new queue. The element to add. The new immutable queue with the specified element added. Returns the element at the beginning of the immutable queue without removing it. The queue is empty. The element at the beginning of the queue. Gets a value that indicates whether this immutable queue is empty. if this queue is empty; otherwise, . Represents a set of elements that can only be modified by creating a new instance of the set. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of element stored in the set. Adds the specified element to this immutable set. The element to add. A new set with the element added, or this set if the element is already in the set. Retrieves an empty immutable set that has the same sorting and ordering semantics as this instance. An empty set that has the same sorting and ordering semantics as this instance. Determines whether this immutable set contains a specified element. The element to locate in the set. if the set contains the specified value; otherwise, . Removes the elements in the specified collection from the current immutable set. The collection of items to remove from this set. A new set with the items removed; or the original set if none of the items were in the set. Creates an immutable set that contains only elements that exist in this set and the specified set. The collection to compare to the current . A new immutable set that contains elements that exist in both sets. Determines whether the current immutable set is a proper (strict) subset of the specified collection. The collection to compare to the current set. if the current set is a proper subset of the specified collection; otherwise, . Determines whether the current immutable set is a proper (strict) superset of the specified collection. The collection to compare to the current set. if the current set is a proper superset of the specified collection; otherwise, . Determines whether the current immutable set is a subset of a specified collection. The collection to compare to the current set. if the current set is a subset of the specified collection; otherwise, . Determines whether the current immutable set is a superset of a specified collection. The collection to compare to the current set. if the current set is a superset of the specified collection; otherwise, . Determines whether the current immutable set overlaps with the specified collection. The collection to compare to the current set. if the current set and the specified collection share at least one common element; otherwise, . Removes the specified element from this immutable set. The element to remove. A new set with the specified element removed, or the current set if the element cannot be found in the set. Determines whether the current immutable set and the specified collection contain the same elements. The collection to compare to the current set. if the sets are equal; otherwise, . Creates an immutable set that contains only elements that are present either in the current set or in the specified collection, but not both. The collection to compare to the current set. A new set that contains the elements that are present only in the current set or in the specified collection, but not both. Determines whether the set contains a specified value. The value to search for. The matching value from the set, if found, or equalvalue if there are no matches. if a matching value was found; otherwise, . Creates a new immutable set that contains all elements that are present in either the current set or in the specified collection. The collection to add elements from. A new immutable set with the items added; or the original set if all the items were already in the set. Represents an immutable last-in-first-out (LIFO) collection. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of elements in the stack. Removes all objects from the immutable stack. An empty immutable stack. Returns the element at the top of the immutable stack without removing it. The stack is empty. The element at the top of the stack. Removes the element at the top of the immutable stack and returns the new stack. The stack is empty. The new stack; never . Inserts an element at the top of the immutable stack and returns the new stack. The element to push onto the stack. The new stack. Gets a value that indicates whether this immutable stack is empty. if this stack is empty; otherwise,. Provides methods for creating an array that is immutable; meaning it cannot be changed once it is created. NuGet package: System.Collections.Immutable (about immutable collections and how to install) 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. The sorted array to search. The object to search for. The type of element stored in the array. does not implement or the search encounters an element that does not implement . The zero-based index of the item in the array, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than or, if there is no larger element, the bitwise complement of . Searches a sorted immutable array for a specified element and returns the zero-based index of the element, if it's found. The sorted array to search. The object to search for. The comparer implementation to use when comparing elements, or null to use the default comparer. The type of element stored in the array. is null and does not implement or the search encounters an element that does not implement . The zero-based index of the item in the array, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than or, if there is no larger element, the bitwise complement of . Searches a sorted immutable array for a specified element and returns the zero-based index of the element, if it's found. The sorted array to search. The starting index of the range to search. The length of the range to search. The object to search for. The type of element stored in the array. does not implement or the search encounters an element that does not implement . and do not specify a valid range in . is less than the lower bound of . -or- is less than zero. The zero-based index of the item in the array, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than or, if there is no larger element, the bitwise complement of . Searches a sorted immutable array for a specified element and returns the zero-based index of the element. The sorted array to search. The starting index of the range to search. The length of the range to search. The object to search for. The comparer to use when comparing elements for equality or to use the default comparer. The type of element stored in the array. is null and does not implement or the search encounters an element that does not implement . and do not specify a valid range in . -or- is , and is of a type that is not compatible with the elements of . is less than the lower bound of . -or- is less than zero. The zero-based index of the item in the array, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than or, if there is no larger element, the bitwise complement of . Creates an empty immutable array. The type of elements stored in the array. An empty immutable array. Creates an immutable array that contains the specified object. The object to store in the array. The type of elements stored in the array. An immutable array that contains the specified object. Creates an immutable array that contains the specified objects. The first object to store in the array. The second object to store in the array. The type of elements stored in the array. An immutable array that contains the specified objects. Creates an immutable array that contains the specified objects. The first object to store in the array. The second object to store in the array. The third object to store in the array. The type of elements stored in the array. An immutable array that contains the specified objects. Creates an immutable array that contains the specified objects. The first object to store in the array. The second object to store in the array. The third object to store in the array. The fourth object to store in the array. The type of elements stored in the array. An immutable array that contains the specified objects. Creates an immutable array from the specified array of objects. The array of objects to populate the array with. The type of elements stored in the array. An immutable array that contains the array of items. Creates an immutable array with specified objects from another array. The source array of objects. The index of the first element to copy from . The number of elements from to include in this immutable array. The type of elements stored in the array. An immutable array that contains the specified objects from the source array. Creates an immutable array with the specified objects from another immutable array. The source array of objects. The index of the first element to copy from . The number of elements from to include in this immutable array. The type of elements stored in the array. An immutable array that contains the specified objects from the source array. Creates an with the specified elements. The elements to store in the array. The type of element stored in the array. An immutable array containing the specified items. Creates an with the specified elements. The elements to store in the array. The type of element stored in the array. An immutable array containing the specified items. Creates a mutable array that can be converted to an without allocating new memory. The type of elements stored in the builder. A mutable array of the specified type that can be efficiently converted to an immutable array. Creates a mutable array that can be converted to an without allocating new memory. The initial capacity of the builder. The type of elements stored in the builder. A mutable array of the specified type that can be efficiently converted to an immutable array. Creates a new populated with the specified items. The elements to add to the array. The type of element stored in the array. An immutable array that contains the specified items. Initializes a new instance of the struct. The source array to initialize the resulting array with. The function to apply to each element from the source array. The type of element stored in the source array. The type of element to store in the target array. An immutable array that contains the specified items. Initializes a new instance of the struct. The source array to initialize the resulting array with. The index of the first element in the source array to include in the resulting array. The number of elements from the source array to include in the resulting array. The function to apply to each element from the source array included in the resulting array. The type of element stored in the source array. The type of element to store in the target array. An immutable array that contains the specified items. Initializes a new instance of the struct. The source array to initialize the resulting array with. The function to apply to each element from the source array. An argument to be passed to the selector mapping function. The type of element stored in the source array. The type of argument to pass to the selector mapping function. The type of element to store in the target array. An immutable array that contains the specified items. Initializes a new instance of the struct. The source array to initialize the resulting array with. The index of the first element in the source array to include in the resulting array. The number of elements from the source array to include in the resulting array. The function to apply to each element from the source array included in the resulting array. An argument to be passed to the selector mapping function. The type of element stored in the source array. The type of argument to be passed to the selector mapping function. The type of element to be stored in the target array. An immutable array that contains the specified items. Creates an immutable array from the specified collection. The collection of objects to copy to the immutable array. The type of elements contained in . An immutable array that contains the specified collection of objects. Creates an immutable array from the current contents of the builder's array. The builder to create the immutable array from. The type of elements contained in the immutable array. An immutable array that contains the current contents of the builder's array. Produce an immutable array of contents from specified elements. The elements to store in the array. The type of element in the list. An immutable array containing the items in the span. Converts the span to an immutable array. The elements to store in the array. The type of element in the list. An immutable array containing the items in the span. Represents an array that is immutable; meaning it cannot be changed once it is created. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of element stored by the array. Gets an empty immutable array. Returns a copy of the original array with the specified item added to the end. The item to be added to the end of the array. A new array with the specified item added to the end. Adds the specified values to this list. The values to add. A new list with the elements added. Adds the specified items to the end of the array. The values to add. The number of elements from the source array to add. A new list with the elements added. Returns a copy of the original array with the specified elements added to the end of the array. The elements to add to the array. A new array with the elements added. Returns a copy of the original array with the specified elements added to the end of the array. The elements to add to the array. A new array with the elements added. Adds the specified items to the end of the array. The values to add. The number of elements from the source array to add. A new list with the elements added. Adds the specified values to this list. The values to add. A new list with the elements added. Adds the specified items to the end of the array. The values to add. The type that derives from the type of item already in the array. A new list with the elements added. Adds the specified items to the end of the array. The values to add. The type that derives from the type of item already in the array. A new list with the elements added. Returns a new immutable array that contains the elements of this array cast to a different type. The type of array element to return. An immutable array that contains the elements of this array, cast to a different type. If the cast fails, returns an array whose property returns . Creates a new read-only memory region over this immutable array. The read-only memory representation of this immutable array. Creates a new read-only span over this immutable array. The read-only span representation of this immutable array. Creates a over the portion of the current , beginning at a specified position for a specified length. The index at which to begin the span. The number of items in the span. The representation of the . Creates a span over the portion of the current based on the specified . A range in the current . A span representation of the . Initializes a new instance of the struct by casting the underlying array to an array of type . The type of array element to return. The cast is illegal. An immutable array instance with elements cast to the new type. Initializes a new instance of the struct based on the contents of an existing instance, allowing a covariant static cast to efficiently reuse the existing array. The array to initialize the array with. No copy is made. The type of array element to return. An immutable array instance with elements cast to the new type. Returns an array with all the elements removed. An array with all of the elements removed. Determines whether the specified item exists in the array. The item to search for. if the specified item was found in the array; otherwise . Determines whether the specified item exists in the array. The item to search for. The equality comparer to use in the search. If , is used. if an equal value was found in the array; otherwise. Copies the contents of this array to the specified array. The array to copy to. Copies the contents of this array to the specified array starting at the specified destination index. The array to copy to. The index in where copying begins. Copies the specified items in this array to the specified array at the specified starting index. The index of this array where copying begins. The array to copy to. The index in where copying begins. The number of elements to copy from this array. Copies the elements of current to a . The that is the destination of the elements copied from current . Indicates whether specified array is equal to this array. An object to compare with this object. if is equal to this array; otherwise, . Determines if this array is equal to the specified object. The to compare with this array. if this array is equal to ; otherwise, . Returns an enumerator that iterates through the contents of the array. An enumerator. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Searches the array for the specified item. The item to search for. The zero-based index position of the item if it is found, or -1 if it is not. Searches the array for the specified item. The item to search for. The index at which to begin the search. The zero-based index position of the item if it is found, or -1 if it is not. Searches the array for the specified item. The item to search for. The index at which to begin the search. The equality comparer to use in the search. The zero-based index position of the item if it is found, or -1 if it is not. Searches the array for the specified item. The item to search for. The index at which to begin the search. The number of elements to search. The zero-based index position of the item if it is found, or -1 if it is not. Searches the array for the specified item. The item to search for. The index at which to begin the search. The number of elements to search. The equality comparer to use in the search. The zero-based index position of the item if it is found, or -1 if it is not. Returns a new array with the specified value inserted at the specified position. The 0-based index into the array at which the new item should be added. The item to insert at the start of the array. A new array with the item inserted at the specified index. Inserts the specified values at the specified index. The index at which to insert the value. The elements to insert. The new immutable collection. Inserts the specified values at the specified index. The index at which to insert the value. The elements to insert. A new immutable array with the items inserted at the specified index. Inserts the specified values at the specified index. The index at which to insert the value. The elements to insert. A new immutable array with the items inserted at the specified index. Inserts the specified values at the specified index. The index at which to insert the value. The elements to insert. The new immutable collection. Gets a read-only reference to the element at the specified in the read-only list. The zero-based index of the element to get a reference to. A read-only reference to the element at the specified in the read-only list. Searches the array for the specified item; starting at the end of the array. The item to search for. The 0-based index into the array where the item was found; or -1 if it could not be found. Searches the array for the specified item; starting at the end of the array. The item to search for. The index at which to begin the search. The 0-based index into the array where the item was found; or -1 if it could not be found. Searches the array for the specified item; starting at the end of the array. The item to search for. The index at which to begin the search. The number of elements to search. The 0-based index into the array where the item was found; or -1 if it could not be found. Searches the array for the specified item; starting at the end of the array. The item to search for. The index at which to begin the search. The number of elements to search. The equality comparer to use in the search. The 0-based index into the array where the item was found; or -1 if it could not be found. Filters the elements of this array to those assignable to the specified type. The type to filter the elements of the sequence on. An that contains elements from the input sequence of type of . Returns a value that indicates if two arrays are equal. The array to the left of the operator. The array to the right of the operator. if the arrays are equal; otherwise, . Returns a value that indicates if two arrays are equal. The array to the left of the operator. The array to the right of the operator. if the arrays are equal; otherwise, . Returns a value that indicates whether two arrays are not equal. The array to the left of the operator. The array to the right of the operator. if the arrays are not equal; otherwise, . Checks for inequality between two array. The object to the left of the operator. The object to the right of the operator. if the two arrays are not equal; otherwise, . 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. The item to remove. A new array with the item removed. 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. The item to remove. The equality comparer to use in the search. A new array with the specified item removed. Removes all the items from the array that meet the specified condition. The delegate that defines the conditions of the elements to remove. A new array with items that meet the specified condition removed. Returns an array with the element at the specified position removed. The 0-based index of the element to remove from the returned array. A new array with the item at the specified index removed. Removes the specified values from this list. The items to remove if matches are found in this list. The equality comparer to use in the search. A new list with the elements removed. Removes the specified items from this array. The items to remove if matches are found in this list. A new array with the elements removed. Removes the specified items from this array. The items to remove if matches are found in this list. The equality comparer to use in the search. A new array with the elements removed. Removes the specified values from this list. The items to remove if matches are found in this list. A new list with the elements removed. Removes the specified items from this list. The items to remove if matches are found in this list. The equality comparer to use in the search. A new array with the elements removed. Returns an array with the elements at the specified position removed. The 0-based index of the starting element to remove from the array. The number of elements to remove from the array. The new array with the specified elements removed. Removes the specified values from this list. The items to remove if matches are found in this list. The equality comparer to use in the search. A new list with the elements removed. Finds the first element in the array equal to the specified value and replaces the value with the specified new value. The value to find and replace in the array. The value to replace the oldvalue with. is not found in the array. A new array that contains even if the new and old values are the same. Finds the first element in the array equal to the specified value and replaces the value with the specified new value. The value to find and replace in the array. The value to replace the oldvalue with. The equality comparer to use to compare values. is not found in the array. A new array that contains even if the new and old values are the same. Replaces the item at the specified index with the specified item. The index of the item to replace. The item to add to the list. The new array that contains at the specified index. Forms a slice out of the current starting at a specified index for a specified length. The index at which to begin this slice. The desired length for the slice. An that consists of elements from the current , starting at . Sorts the elements in the immutable array using the default comparer. A new immutable array that contains the items in this array, in sorted order. Sorts the elements in the immutable array using the specified comparer. The implementation to use when comparing elements, or to use the default comparer. A new immutable array that contains the items in this array, in sorted order. Sorts the elements in the entire using the specified . The to use when comparing elements. is null. The sorted list. Sorts the specified elements in the immutable array using the specified comparer. The index of the first element to sort. The number of elements to include in the sort. The implementation to use when comparing elements, or to use the default comparer. A new immutable array that contains the items in this array, in sorted order. Throws in all cases. The item to add to the end of the array. Throws in all cases. Throws in all cases. The object to remove from the array. Throws in all cases. Returns an enumerator that iterates through the array. The property returns . An enumerator that can be used to iterate through the array. Throws in all cases. The index of the location to insert the item. The item to insert. Throws in all cases. The index. Copies this array to another array starting at the specified index. The array to copy this array to. The index in the destination array to start the copy operation. Returns an enumerator that iterates through the immutable array. The property returns . An enumerator that iterates through the immutable array. Throws in all cases. The value to add to the array. Thrown in all cases. Throws in all cases. Throws in all cases. Thrown in all cases. Throws in all cases. The value to check for. Throws in all cases. Gets the value at the specified index. The value to return the index of. The value of the element at the specified index. Throws in all cases. Index that indicates where to insert the item. The value to insert. Thrown in all cases. Throws in all cases. The value to remove from the array. Thrown in all cases. Throws in all cases. The index of the item to remove. Thrown in all cases. Returns a copy of the original array with the specified item added to the end. The value to add to the end of the array. A new array with the specified item added to the end. Returns a copy of the original array with the specified elements added to the end of the array. The elements to add to the end of the array. A new array with the elements added to the end. Returns an array with all the elements removed. An array with all the elements removed. Returns a new array with the specified value inserted at the specified position. The 0-based index into the array at which the new item should be added. The item to insert at the start of the array. A new array with the specified value inserted. Inserts the specified values at the specified index. The index at which to insert the value. The elements to insert. A new array with the specified values inserted. 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. The value to remove from the array. The equality comparer to use in the search. A new array with the value removed. Removes all the items from the array that meet the specified condition. The delegate that defines the conditions of the elements to remove. A new array with items that meet the specified condition removed. Returns an array with the element at the specified position removed. The 0-based index of the element to remove from the returned array. A new array with the specified item removed. Removes the specified items from this array. The items to remove if matches are found in this list. The equality comparer to use in the search. A new array with the elements removed. Returns an array with the elements at the specified position removed. The 0-based index of the starting element to remove from the array. The number of elements to remove from the array. The new array with the specified elements removed. Finds the first element in the array equal to the specified value and replaces the value with the specified new value. The value to find and replace in the array. The value to replace the oldvalue with. The equality comparer to use to compare values. is not found in the array. A new array that contains even if the new and old values are the same. Replaces the item at the specified index with the specified item. The index of the item to replace. The value to add to the list. The new array that contains at the specified index. Determines whether the current collection element precedes, occurs in the same position as, or follows another element in the sort order. The element to compare with the current instance. The object used to compare members of the current array with the corresponding members of other array. The arrays are not the same length. An integer that indicates whether the current element precedes, is in the same position or follows the other element. Determines whether this array is structurally equal to the specified array. The array to compare with the current instance. An object that determines whether the current instance and other are structurally equal. if the two arrays are structurally equal; otherwise, . Returns a hash code for the current instance. An object that computes the hash code of the current object. The hash code for the current instance. Creates a mutable array that has the same contents as this array and can be efficiently mutated across multiple operations using standard mutable interfaces. The new builder with the same contents as this array. Gets a value indicating whether this array was declared but not initialized. if the is ; otherwise, . Gets a value indicating whether this is empty or is not initialized. if the is or ; otherwise, . Gets a value indicating whether this is empty. if the is empty; otherwise, . Gets the element at the specified index in the immutable array. The zero-based index of the element to get. The element at the specified index in the immutable array. Gets the number of elements in the array. The number of elements in the array. Gets the number of items in the collection. The property returns . Number of items in the collection. Gets a value indicating whether this instance is read only. if this instance is read only; otherwise, . Gets or sets the element at the specified index in the read-only list. The zero-based index of the element to get. Always thrown from the setter. The property returns . The element at the specified index in the read-only list. Gets the number of items in the collection. The property returns . The number of items in the collection. Gets the element at the specified index. The index. The property returns . The element. Gets the size of the array. The property returns . The number of items in the collection. See the interface. Always returns since since immutable collections are thread-safe. Boolean value determining whether the collection is thread-safe. Gets the sync root. An object for synchronizing access to the collection. Gets a value indicating whether this instance is fixed size. if this instance is fixed size; otherwise, . Gets a value indicating whether this instance is read only. if this instance is read only; otherwise, . Gets or sets the at the specified index. The index. Always thrown from the setter. The property returns . The object at the specified index. A writable array accessor that can be converted into an instance without allocating extra memory. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Adds the specified item to the array. The object to add to the array. Adds the specified items to the end of the array. The items to add to the array. Adds the specified items to the end of the array. The items to add to the array. The number of elements from the source array to add. Adds the specified items to the end of the array. The items to add to the array. Adds the specified items to the end of the array. The items to add to the array. Adds the specified items to the end of the array. The items to add to the array. Adds the specified items to the end of the array. The items to add to the array. The number of elements from the source array to add. Adds the specified items to the end of the array. The items to add at the end of the array. Adds the specified items that derive from the type currently in the array, to the end of the array. The items to add to end of the array. The type that derives from the type of item already in the array. Adds the specified items that derive from the type currently in the array, to the end of the array. The items to add to the end of the array. The type that derives from the type of item already in the array. Adds the specified items that derive from the type currently in the array, to the end of the array. The items to add to the end of the array. The type that derives from the type of item already in the array. Adds the specified items to the end of the array. The items to add at the end of the array. The type that derives from the type of item already in the array. Removes all items from the array. Determines whether the array contains a specific value. The object to locate in the array. if the object is found; otherwise, . Copies the contents of this array to the specified array. The array to copy to. Copies the current contents to the specified array. The array to copy to. The index to start the copy operation. Copies the contents of this array to the specified array. The index into this collection of the first element to copy. The array to copy to. The index into the destination array to which the first copied element is written. The number of elements to copy. Copies the current contents to the specified . The to copy to. Returns the current contents as an and sets the collection to a zero length array. An immutable array. Gets an object that can be used to iterate through the collection. An object that can be used to iterate through the collection. Determines the index of a specific item in the array. The item to locate in the array. The index of if it's found in the list; otherwise, -1. Determines the index of the specified item. The item to locate in the array. The starting position of the search. The index of if it's found in the list; otherwise, -1. Searches the array for the specified item. The item to search for. The index at which to begin the search. The equality comparer to use in the search. If , is used. The 0-based index into the array where the item was found; or -1 if it could not be found. Determines the index of the specified item. The item to locate in the array. The starting position of the search. The number of elements to search. The index of if it's found in the list; otherwise, -1. Determines the index for the specified item. The item to locate in the array. The index at which to begin the search. The starting position of the search. The equality comparer to use in the search. The index of if it's found in the list; otherwise, -1. Inserts an item in the array at the specified index. The zero-based index at which to insert the item. The object to insert into the array. Inserts the specified values at the specified index. The index at which to insert the value. The elements to insert. Inserts the specified values at the specified index. The index at which to insert the value. The elements to insert. Gets a read-only reference to the element at the specified index. The item index. is greater or equal to the array count. The read-only reference to the element at the specified index. Determines the 0-based index of the last occurrence of the specified item in this array. The item to search for. The 0-based index where the item was found; or -1 if it could not be found. Determines the 0-based index of the last occurrence of the specified item in this array. The item to search for. The starting position of the search. The 0-based index into the array where the item was found; or -1 if it could not be found. Determines the 0-based index of the last occurrence of the specified item in this array. The item to search for. The starting position of the search. The number of elements to search. The 0-based index into the array where the item was found; or -1 if it could not be found. Determines the 0-based index of the last occurrence of the specified item in this array. The item to search for. The starting position of the search. The number of elements to search. The equality comparer to use in the search. The 0-based index into the array where the item was found; or -1 if it could not be found. Extracts the internal array as an and replaces it with a zero length array. When doesn't equal . An immutable array containing the elements of the builder. Removes the specified element. The item to remove. if was found and removed; otherwise, . Removes the first occurrence of the specified element from the builder. If no match is found, the builder remains unchanged. The element to remove. The equality comparer to use in the search. If , is used. A value indicating whether the specified element was found and removed from the collection. Removes all the elements that match the conditions defined by the specified predicate. The delegate that defines the conditions of the elements to remove. Removes the item at the specified index from the array. The zero-based index of the item to remove. Removes the specified values from this list. The items to remove if matches are found in this list. Removes the specified values from this list. The items to remove if matches are found in this list. The equality comparer to use in the search. If , is used. Removes the specified values from this list. The 0-based index into the array for the element to omit from the returned array. The number of elements to remove. Replaces the first equal element in the list with the specified element. The element to replace. The element to replace the old element with. Replaces the first equal element in the list with the specified element. The element to replace. The element to replace the old element with. The equality comparer to use in the search. If , is used. Reverses the order of elements in the collection. Sorts the contents of the array. Sorts the contents of the array. The comparer to use for sorting. If comparer is , the default comparer for the elements type in the array is used. Sorts the elements in the entire array using the specified . The to use when comparing elements. is null. Sorts the contents of the array. The starting index for the sort. The number of elements to include in the sort. The comparer to use for sorting. If comparer is , the default comparer for the elements type in the array is used. Returns an enumerator that iterates through the array. An enumerator that iterates through the array. Returns an enumerator that iterates through the array. An enumerator that iterates through the array. Creates a new array with the current contents of this . A new array with the contents of this . Returns an immutable array that contains the current contents of this . An immutable array that contains the current contents of this . Gets or sets the length of the internal array. When set, the internal array is reallocated to the given capacity if it is not already the specified length. The length of the internal array. Gets or sets the number of items in the array. The number of items in the array. Gets or sets the item at the specified index. The index of the item to get or set. The specified index is not in the array. The item at the specified index. Gets a value that indicates whether the is read-only. if the is read-only; otherwise, . An array enumerator. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Advances to the next value in the array. if another item exists in the array; otherwise, . Gets the current item. The current item. Provides a set of initialization methods for instances of the class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Determines whether the specified immutable dictionary contains the specified key/value pair. The immutable dictionary to search. The key to locate in the immutable dictionary. The value to locate on the specified key, if the key is found. The type of the keys in the immutable dictionary. The type of the values in the immutable dictionary. if this map contains the specified key/value pair; otherwise, . Creates an empty immutable dictionary. The type of keys stored by the dictionary. The type of values stored by the dictionary. An empty immutable dictionary. Creates an empty immutable dictionary that uses the specified key comparer. The implementation to use to determine the equality of keys in the dictionary. The type of keys stored by the dictionary. The type of values stored by the dictionary. An empty immutable dictionary. Creates an empty immutable dictionary that uses the specified key and value comparers. The implementation to use to determine the equality of keys in the dictionary. The implementation to use to determine the equality of values in the dictionary. The type of keys stored by the dictionary. The type of values stored by the dictionary. An empty immutable dictionary. Creates a new immutable dictionary builder. The type of keys stored by the dictionary. The type of values stored by the dictionary. The new builder. Creates a new immutable dictionary builder. The key comparer. The type of keys stored by the dictionary. The type of values stored by the dictionary. The new builder. Creates a new immutable dictionary builder. The key comparer. The value comparer. The type of keys stored by the dictionary. The type of values stored by the dictionary. The new builder. Creates a new immutable dictionary that contains the specified items. The items used to populate the dictionary before it's immutable. The type of keys in the dictionary. The type of values in the dictionary. A new immutable dictionary that contains the specified items. Creates a new immutable dictionary that contains the specified items and uses the specified key comparer. The comparer implementation to use to compare keys for equality. The items to add to the dictionary before it's immutable. The type of keys in the dictionary. The type of values in the dictionary. A new immutable dictionary that contains the specified items and uses the specified comparer. Creates a new immutable dictionary that contains the specified items and uses the specified key comparer. The comparer implementation to use to compare keys for equality. The comparer implementation to use to compare values for equality. The items to add to the dictionary before it's immutable. The type of keys in the dictionary. The type of values in the dictionary. A new immutable dictionary that contains the specified items and uses the specified comparer. Gets the value for a given key if a matching key exists in the dictionary. The dictionary to retrieve the value from. The key to search for. The type of the key. The type of the value. The value for the key, or default(TValue) if no matching key was found. Gets the value for a given key if a matching key exists in the dictionary. The dictionary to retrieve the value from. The key to search for. The default value to return if no matching key is found in the dictionary. The type of the key. The type of the value. The value for the key, or if no matching key was found. Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys. The source collection used to generate the immutable dictionary. The function used to transform keys for the immutable dictionary. The type of element in the source collection. The type of key in the resulting immutable dictionary. The immutable dictionary that contains elements from , with keys transformed by applying . Constructs an immutable dictionary based on some transformation of a sequence. The source collection used to generate the immutable dictionary. The function used to transform keys for the immutable dictionary. The key comparer to use for the dictionary. The type of element in the source collection. The type of key in the resulting immutable dictionary. The immutable dictionary that contains elements from , with keys transformed by applying . Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents. The sequence of key/value pairs to enumerate. The type of the keys in the dictionary. The type of the values in the dictionary. An immutable dictionary that contains the key/value pairs in the specified sequence. Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key comparer. The sequence of key/value pairs to enumerate. The key comparer to use when building the immutable dictionary. The type of the keys in the dictionary. The type of the values in the dictionary. An immutable dictionary that contains the key/value pairs in the specified sequence. Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key and value comparers. The sequence of key/value pairs to enumerate. The key comparer to use when building the immutable dictionary. The value comparer to use for the immutable dictionary. The type of the keys in the dictionary. The type of the values in the dictionary. An immutable dictionary that contains the key/value pairs in the specified sequence. Creates an immutable dictionary from the current contents of the builder's dictionary. The builder to create the immutable dictionary from. The type of the keys in the dictionary. The type of the values in the dictionary. An immutable dictionary that contains the current contents in the builder's dictionary. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents. The sequence to enumerate to generate the dictionary. The function that will produce the key for the dictionary from each sequence element. The function that will produce the value for the dictionary from each sequence element. The type of the elements in the sequence. The type of the keys in the resulting dictionary. The type of the values in the resulting dictionary. An immutable dictionary that contains the items in the specified sequence. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer. The sequence to enumerate to generate the dictionary. The function that will produce the key for the dictionary from each sequence element. The function that will produce the value for the dictionary from each sequence element. The key comparer to use for the dictionary. The type of the elements in the sequence. The type of the keys in the resulting dictionary. The type of the values in the resulting dictionary. An immutable dictionary that contains the items in the specified sequence. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers. The sequence to enumerate to generate the dictionary. The function that will produce the key for the dictionary from each sequence element. The function that will produce the value for the dictionary from each sequence element. The key comparer to use for the dictionary. The value comparer to use for the dictionary. The type of the elements in the sequence. The type of the keys in the resulting dictionary. The type of the values in the resulting dictionary. An immutable dictionary that contains the items in the specified sequence. Represents an immutable, unordered collection of keys and values. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of the keys in the dictionary. The type of the values in the dictionary. Gets an empty immutable dictionary. Adds an element with the specified key and value to the immutable dictionary. The key of the element to add. The value of the element to add. The given key already exists in the dictionary but has a different value. A new immutable dictionary that contains the additional key/value pair. Adds the specified key/value pairs to the immutable dictionary. The key/value pairs to add. One of the given keys already exists in the dictionary but has a different value. A new immutable dictionary that contains the additional key/value pairs. Retrieves an empty immutable dictionary that has the same ordering and key/value comparison rules as this dictionary instance. An empty dictionary with equivalent ordering and key/value comparison rules. Determines whether this immutable dictionary contains the specified key/value pair. The key/value pair to locate. if the specified key/value pair is found in the dictionary; otherwise, . Determines whether the immutable dictionary contains an element with the specified key. The key to locate. if the immutable dictionary contains an element with the specified key; otherwise, . Determines whether the immutable dictionary contains an element with the specified value. The value to locate. The value can be for reference types. if the dictionary contains an element with the specified value; otherwise, . Returns an enumerator that iterates through the immutable dictionary. An enumerator that can be used to iterate through the dictionary. Removes the element with the specified key from the immutable dictionary. The key of the element to remove. A new immutable dictionary with the specified element removed; or this instance if the specified key cannot be found in the dictionary. Removes the elements with the specified keys from the immutable dictionary. The keys of the elements to remove. A new immutable dictionary with the specified keys removed; or this instance if the specified keys cannot be found in the dictionary. Sets the specified key and value in the immutable dictionary, possibly overwriting an existing value for the key. The key of the entry to add. The key value to set. A new immutable dictionary that contains the specified key/value pair. Sets the specified key/value pairs in the immutable dictionary, possibly overwriting existing values for the keys. The key/value pairs to set in the dictionary. If any of the keys already exist in the dictionary, this method will overwrite their previous values. A new immutable dictionary that contains the specified key/value pairs. Adds an item to the . The object to add to the . Removes all items from the . Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. Removes the first occurrence of a specific object from the . The object to remove from the . if was successfully removed from the ; otherwise, . This method also returns if is not found in the original . Adds an element with the provided key and value to the immutable dictionary. The object to use as the key of the element to add. The object to use as the value of the element to add. is . An element with the same key already exists in the . The is read-only. Removes the element with the specified key from the generic dictionary. The key of the element to remove. is . The is read-only. if the element is successfully removed; otherwise, . This method also returns if was not found in the original generic dictionary. Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Copies the elements of the dictionary to an array, starting at a particular array index. The one-dimensional array that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. The zero-based index in at which copying begins. Adds an element with the provided key and value to the immutable dictionary object. The object to use as the key of the element to add. The object to use as the value of the element to add. Clears this instance. The dictionary object is read-only. Determines whether the immutable dictionary object contains an element with the specified key. The key to locate in the dictionary object. if the dictionary contains an element with the key; otherwise, . Returns an object for the immutable dictionary object. An enumerator object for the dictionary object. Removes the element with the specified key from the immutable dictionary object. The key of the element to remove. Returns an enumerator that iterates through a collection. An enumerator object that can be used to iterate through the collection. See the interface. Key of the entry to be added. Value of the entry to be added. A new immutable dictionary that contains the additional key/value pair. See the interface. Sequence of key/value pairs to be added to the dictionary. A new immutable dictionary that contains the additional key/value pairs. Retrieves an empty dictionary that has the same ordering and key-value comparison rules as this dictionary instance. The immutable dictionary instance. See the interface. Key of the entry to be removed. A new immutable dictionary with the specified element removed; or this instance if the specified key cannot be found in the dictionary. See the interface. Sequence of keys to be removed. A new immutable dictionary with the specified keys removed; or this instance if the specified keys cannot be found in the dictionary. See the interface. Key of entry to be added. Value of the entry to be added. A new immutable dictionary that contains the specified key/value pair. Applies a given set of key-value pairs to an immutable dictionary, replacing any conflicting keys in the resulting dictionary. The key-value pairs to set on the map. Any keys that conflict with existing keys will replace the previous values. A copy of the immutable dictionary with updated key-value pairs. Creates an immutable dictionary with the same contents as this dictionary that can be efficiently mutated across multiple operations by using standard mutable interfaces. A collection with the same contents as this dictionary that can be efficiently mutated across multiple operations by using standard mutable interfaces. Determines whether this dictionary contains a specified key. The key to search for. The matching key located in the dictionary if found, or equalkey if no match is found. if a match for is found; otherwise, . Gets the value associated with the specified key. The key whose value will be retrieved. When this method returns, contains the value associated with the specified key, if the key is found; otherwise, contains the default value for the type of the parameter. This parameter is passed uninitialized. is null. if the object that implements the dictionary contains an element with the specified key; otherwise, . Gets an instance of the immutable dictionary that uses the specified key comparer. The key comparer to use. An instance of the immutable dictionary that uses the given comparer. Gets an instance of the immutable dictionary that uses the specified key and value comparers. The key comparer to use. The value comparer to use. An instance of the immutable dictionary that uses the given comparers. Gets the number of key/value pairs in the immutable dictionary. The number of key/value pairs in the dictionary. Gets a value that indicates whether this instance of the immutable dictionary is empty. if this instance is empty; otherwise, . Gets the associated with the specified key. The type of the key. The value associated with the specified key. If no results are found, the operation throws an exception. Gets the key comparer for the immutable dictionary. The key comparer. Gets the keys in the immutable dictionary. The keys in the immutable dictionary. Gets a value indicating whether the is read-only. if the is read-only; otherwise, . Gets or sets the with the specified key. The type of the key. An object of type associated with the . Gets the keys. A collection containing the keys. Gets the values. A collection containing the values. Gets a value indicating whether access to the is synchronized (thread safe). if access to the is synchronized (thread safe); otherwise, . Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . Gets a value indicating whether the object has a fixed size. if the object has a fixed size; otherwise, . Gets a value indicating whether the is read-only. if the is read-only; otherwise, . Gets or sets the element with the specified key. The key. The value stored under the specified key. Gets an containing the keys of the . An containing the keys of the object that implements . Gets an containing the values in the . An containing the values in the object that implements . Gets the value comparer used to determine whether values are equal. The value comparer used to determine whether values are equal. Gets the values in the immutable dictionary. The values in the immutable dictionary. Represents a hash map that mutates with little or no memory allocations and that can produce or build on immutable hash map instances very efficiently. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Adds an element that has the specified key and value to the immutable dictionary. The key of the element to add. The value of the element to add. is null. An element with the same key already exists in the dictionary. The dictionary is read-only. Adds the specified item to the immutable dictionary. The object to add to the dictionary. The dictionary is read-only. Adds a sequence of values to this collection. The items to add to this collection. Removes all items from the immutable dictionary. The dictionary is read-only. Determines whether the immutable dictionary contains a specific value. The object to locate in the dictionary. if is found in the dictionary; otherwise, . Determines whether the immutable dictionary contains an element that has the specified key. The key to locate in the dictionary. is null. if the dictionary contains an element with the key; otherwise, . Determines whether the immutable dictionary contains an element that has the specified value. The value to locate in the immutable dictionary. The value can be for reference types. if the dictionary contains an element with the specified value; otherwise, . Returns an enumerator that iterates through the immutable dictionary. An enumerator that can be used to iterate through the collection. Gets the value for a given key if a matching key exists in the dictionary. The key to search for. The value for the key, or default(TValue) if no matching key was found. Gets the value for a given key if a matching key exists in the dictionary. The key to search for. The default value to return if no matching key is found in the dictionary. The value for the key, or if no matching key was found. Removes the element with the specified key from the immutable dictionary. The key of the element to remove. is null. The dictionary is read-only. if the element is successfully removed; otherwise, . This method also returns if was not found in the dictionary. Removes the first occurrence of a specific object from the immutable dictionary. The object to remove from the dictionary. The dictionary is read-only. if was successfully removed from the dictionary; otherwise, . This method also returns false if is not found in the dictionary. Removes any entries with keys that match those found in the specified sequence from the immutable dictionary. The keys for entries to remove from the dictionary. Copies the elements of the dictionary to an array of type , starting at the specified array index. The one-dimensional array that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. The zero-based index in at which copying begins. Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Copies the elements of the dictionary to an array of type , starting at the specified array index. The one-dimensional array of type that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. The zero-based index in at which copying begins. Adds an element with the provided key and value to the dictionary object. The key of the element to add. The value of the element to add. Determines whether the dictionary object contains an element with the specified key. The key to locate. if the dictionary contains an element with the key; otherwise, . Returns an object for the dictionary. An object for the dictionary. Removes the element with the specified key from the dictionary. The key of the element to remove. Returns an enumerator that iterates through a collection. An enumerator object that can be used to iterate through the collection. Creates an immutable dictionary based on the contents of this instance. An immutable dictionary. Determines whether this dictionary contains a specified key. The key to search for. The matching key located in the dictionary if found, or equalkey if no match is found. if a match for is found; otherwise, . Returns the value associated with the specified key. The key whose value will be retrieved. When this method returns, contains the value associated with the specified key, if the key is found; otherwise, returns the default value for the type of the parameter. This parameter is passed uninitialized. is null. if the object that implements the immutable dictionary contains an element with the specified key; otherwise, . Gets the number of elements contained in the immutable dictionary. The number of elements contained in the immutable dictionary. Gets or sets the element with the specified key. The element to get or set. is . The property is being retrieved, and is not found. The property is being set, and the is read-only. The element that has the specified key. Gets or sets the key comparer. The key comparer. Gets a collection that contains the keys of the immutable dictionary. A collection that contains the keys of the object that implements the immutable dictionary. Gets a value that indicates whether the collection is read-only. if the collection is read-only; otherwise, . Gets a collection containing the keys of the generic dictionary. A collection containing the keys of the object that implements the generic dictionary. Gets a collection containing the values in the generic dictionary. A collection containing the values in the object that implements the generic dictionary. Gets a value that indicates whether access to the is synchronized (thread safe). if access to the is synchronized (thread safe); otherwise, . Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . Gets a value that indicates whether the object has a fixed size. if the object has a fixed size; otherwise, . Gets a value that indicates whether the is read-only. if the is read-only; otherwise, . Gets or sets the element with the specified key. The key. Value stored under specified key. Gets an containing the keys of the . An containing the keys of the object that implements . Gets an containing the values in the . An containing the values in the object that implements . Gets or sets the value comparer. The value comparer. Gets a collection that contains the values of the immutable dictionary. A collection that contains the values of the object that implements the dictionary. Enumerates the contents of the immutable dictionary without allocating any memory. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Releases the resources used by the current instance of the class. Advances the enumerator to the next element of the immutable dictionary. The dictionary was modified after the enumerator was created. if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the dictionary. Sets the enumerator to its initial position, which is before the first element in the dictionary. The dictionary was modified after the enumerator was created. Gets the element at the current position of the enumerator. The element in the dictionary at the current position of the enumerator. Gets the current element. Current element in enumeration. Provides a set of initialization methods for instances of the class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Creates an empty immutable hash set. The type of items to be stored in the immutable hash set. An empty immutable hash set. Creates a new immutable hash set that contains the specified item. The item to prepopulate the hash set with. The type of items in the immutable hash set. A new immutable hash set that contains the specified item. Creates a new immutable hash set that contains the specified array of items. An array that contains the items to prepopulate the hash set with. The type of items in the immutable hash set. A new immutable hash set that contains the specified items. Creates an empty immutable hash set that uses the specified equality comparer. The object to use for comparing objects in the set for equality. The type of items in the immutable hash set. An empty immutable hash set. Creates a new immutable hash set that contains the specified item and uses the specified equality comparer for the set type. The object to use for comparing objects in the set for equality. The item to prepopulate the hash set with. The type of items in the immutable hash set. A new immutable hash set that contains the specified item. Creates a new immutable hash set that contains the items in the specified collection and uses the specified equality comparer for the set type. The object to use for comparing objects in the set for equality. An array that contains the items to prepopulate the hash set with. The type of items stored in the immutable hash set. A new immutable hash set that contains the specified items. Creates a new immutable collection prefilled with the specified items. The equality comparer. The items to prepopulate. The type of items stored by the collection. The new immutable collection. Creates a new immutable collection prefilled with the specified items. The items to prepopulate. The type of items stored by the collection. The new immutable collection. Creates a new immutable hash set builder. The type of items stored by the collection. The immutable hash set builder. Creates a new immutable hash set builder. The object to use for comparing objects in the set for equality. The type of items stored by the collection. The new immutable hash set builder. Creates a new immutable hash set prefilled with the specified items. The items to add to the hash set. The type of items stored by the collection. The new immutable hash set that contains the specified items. Creates a new immutable hash set that contains the specified items and uses the specified equality comparer for the set type. The object to use for comparing objects in the set for equality. The items add to the collection before immutability is applied. The type of items stored in the collection. The new immutable hash set. Enumerates a sequence and produces an immutable hash set of its contents. The sequence to enumerate. The type of the elements in the sequence. An immutable hash set that contains the items in the specified sequence. Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type. The sequence to enumerate. The object to use for comparing objects in the set for equality. The type of the elements in the sequence. An immutable hash set that contains the items in the specified sequence and uses the specified equality comparer. Creates an immutable hash set from the current contents of the builder's set. The builder to create the immutable hash set from. The type of the elements in the hash set. An immutable hash set that contains the current contents in the builder's set. Represents an immutable, unordered hash set. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of elements in the hash set. Gets an immutable hash set for this type that uses the default . Adds the specified element to the hash set. The element to add to the set. A hash set that contains the added value and any values previously held by the object. Retrieves an empty immutable hash set that has the same sorting and ordering semantics as this instance. An empty hash set that has the same sorting and ordering semantics as this instance. Determines whether this immutable hash set contains the specified element. The object to locate in the immutable hash set. if is found in the ; otherwise, . Removes the elements in the specified collection from the current immutable hash set. The collection of items to remove from this set. A new set with the items removed; or the original set if none of the items were in the set. Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Creates an immutable hash set that contains elements that exist in both this set and the specified set. The collection to compare to the current set. A new immutable set that contains any elements that exist in both sets. Determines whether the current immutable hash set is a proper (strict) subset of a specified collection. The collection to compare to the current set. if the current set is a proper subset of the specified collection; otherwise, . Determines whether the current immutable hash set is a proper (strict) superset of a specified collection. The collection to compare to the current set. if the current set is a proper superset of the specified collection; otherwise, . Determines whether the current immutable hash set is a subset of a specified collection. The collection to compare to the current set. if the current set is a subset of the specified collection; otherwise, . Determines whether the current immutable hash set is a superset of a specified collection. The collection to compare to the current set. if the current set is a superset of the specified collection; otherwise, . Determines whether the current immutable hash set overlaps with the specified collection. The collection to compare to the current set. if the current set and the specified collection share at least one common element; otherwise, . Removes the specified element from this immutable hash set. The element to remove. A new set with the specified element removed, or the current set if the element cannot be found in the set. Determines whether the current immutable hash set and the specified collection contain the same elements. The collection to compare to the current set. if the sets are equal; otherwise, . Creates an immutable hash set that contains only elements that are present either in the current set or in the specified collection, but not both. The collection to compare to the current set. A new set that contains the elements that are present only in the current set or in the specified collection, but not both. Adds an item to the set. The object to add to the set. The set is read-only. Removes all items from this set. The set is read-only. Copies the elements of the set to an array, starting at a particular index. The one-dimensional array that is the destination of the elements copied from the set. The array must have zero-based indexing. The zero-based index in at which copying begins. Removes the first occurrence of a specific object from the set. The object to remove from the set. if the element is successfully removed; otherwise, . Returns an enumerator that iterates through the collection. An enumerator that iterates through the collection. Adds an element to the current set and returns a value that indicates whether the element was successfully added. The element to add to the collection. if the element is added to the set; if the element is already in the set. Removes all elements in the specified collection from the current set. The collection of items to remove. Modifies the current set so that it contains only elements that are also in a specified collection. The collection to compare to the current collection. Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. The collection to compare to the current set. Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection. The collection to compare to the current set. Copies the elements of the set to an array, starting at a particular index. The one-dimensional array that is the destination of the elements copied from the set. The array must have zero-based indexing. The zero-based index in at which copying begins. Returns an enumerator that iterates through a set. An enumerator that can be used to iterate through the set. Adds the specified element to this immutable set. The element to add. A new set with the element added, or this set if the element is already in the set. Retrieves an empty set that has the same sorting and ordering semantics as this instance. An empty set that has the same sorting or ordering semantics as this instance. Removes the elements in the specified collection from the current set. The collection of items to remove from this set. A new set with the items removed; or the original set if none of the items were in the set. Creates an immutable set that contains elements that exist in both this set and the specified set. The collection to compare to the current set. A new immutable set that contains any elements that exist in both sets. Removes the specified element from this immutable set. The element to remove. A new set with the specified element removed, or the current set if the element cannot be found in the set. Creates an immutable set that contains only elements that are present either in the current set or in the specified collection, but not both. The collection to compare to the current set. A new set that contains the elements that are present only in the current set or in the specified collection, but not both. Creates a new immutable set that contains all elements that are present in either the current set or in the specified collection. The collection to add elements from. A new immutable set with the items added; or the original set if all the items were already in the set. Creates an immutable hash set that has the same contents as this set and can be efficiently mutated across multiple operations by using standard mutable interfaces. A set with the same contents as this set that can be efficiently mutated across multiple operations by using standard mutable interfaces. Searches the set for a given value and returns the equal value it finds, if any. The value to search for. The value from the set that the search found, or the original value if the search yielded no match. A value indicating whether the search was successful. Creates a new immutable hash set that contains all elements that are present in either the current set or in the specified collection. The collection to add elements from. A new immutable hash set with the items added; or the original set if all the items were already in the set. Gets an instance of the immutable hash set that uses the specified equality comparer for its search methods. The equality comparer to use. An instance of this immutable hash set that uses the given comparer. Gets the number of elements in the immutable hash set. The number of elements in the hash set. Gets a value that indicates whether the current immutable hash set is empty. if this instance is empty; otherwise, . Gets the object that is used to obtain hash codes for the keys and to check the equality of values in the immutable hash set. The comparer used to obtain hash codes for the keys and check equality. See the interface. if the is read-only; otherwise, . See the interface. if access to the is synchronized (thread safe); otherwise, . See . An object that can be used to synchronize access to the . Represents a hash set that mutates with little or no memory allocations and that can produce or build on immutable hash set instances very efficiently. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Adds the specified item to the immutable hash set. The item to add. if the item did not already belong to the collection; otherwise, . Removes all items from the immutable hash set. The hash set is read-only. Determines whether the immutable hash set contains a specific value. The object to locate in the hash set. if is found in the hash set ; otherwise, . Removes all elements in the specified collection from the current hash set. The collection of items to remove from the set. Returns an enumerator that iterates through the immutable hash set. An enumerator that can be used to iterate through the set. Modifies the current set so that it contains only elements that are also in a specified collection. The collection to compare to the current set. Determines whether the current set is a proper (strict) subset of a specified collection. The collection to compare to the current set. if the current set is a proper subset of ; otherwise, . Determines whether the current set is a proper (strict) superset of a specified collection. The collection to compare to the current set. if the current set is a proper superset of ; otherwise, . Determines whether the current set is a subset of a specified collection. The collection to compare to the current set. if the current set is a subset of ; otherwise, . Determines whether the current set is a superset of a specified collection. The collection to compare to the current set. if the current set is a superset of ; otherwise, . Determines whether the current set overlaps with the specified collection. The collection to compare to the current set. if the current set and share at least one common element; otherwise, . Removes the first occurrence of a specific object from the immutable hash set. The object to remove from the set. The set is read-only. if was successfully removed from the set ; otherwise, . This method also returns if is not found in the original set. Determines whether the current set and the specified collection contain the same elements. The collection to compare to the current set. if the current set is equal to ; otherwise, . Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. The collection to compare to the current set. Adds an item to the hash set. The object to add to the set. The set is read-only. Copies the elements of the hash set to an array, starting at a particular array index. The one-dimensional array that is the destination of the elements copied from the hash set. The array must have zero-based indexing. The zero-based index in at which copying begins. Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An enumerator that can be used to iterate through the collection. Creates an immutable hash set based on the contents of this instance. An immutable set. Searches the set for a given value and returns the equal value it finds, if any. The value for which to search. The value from the set that the search found, or the original value if the search yielded no match. A value indicating whether the search was successful. Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection. The collection to compare to the current set. Gets the number of elements contained in the immutable hash set. The number of elements contained in the immutable hash set. Gets or sets the key comparer. The key comparer. Gets a value indicating whether the is read-only. if the is read-only; otherwise, . Enumerates the contents of the immutable hash set without allocating any memory. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Releases the resources used by the current instance of the class. Advances the enumerator to the next element of the immutable hash set. The hash set was modified after the enumerator was created. if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the hash set. Sets the enumerator to its initial position, which is before the first element in the hash set. The hash set was modified after the enumerator was created. Gets the element at the current position of the enumerator. The element at the current position of the enumerator. Gets the current element. The element in the collection at the current position of the enumerator. Contains interlocked exchange mechanisms for immutable collections. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Obtains the value from a dictionary after having added it or updated an existing entry. The variable or field to atomically update if the specified is not in the dictionary. The key for the value to add or update. The value to use if no previous value exists. The function that receives the key and prior value and returns the new value with which to update the dictionary. The type of key stored by the dictionary. The type of value stored by the dictionary. The added or updated value. Obtains the value from a dictionary after having added it or updated an existing entry. The variable or field to atomically update if the specified is not in the dictionary. The key for the value to add or update. The function that receives the key and returns a new value to add to the dictionary when no value previously exists. The function that receives the key and prior value and returns the new value with which to update the dictionary. The type of key stored by the dictionary. The type of value stored by the dictionary. The added or updated value. Atomically enqueues an element to the end of a queue. The variable or field to atomically update. The value to enqueue. The type of items contained in the collection. Gets the value for the specified key from the dictionary, or if the key was not found, adds a new value to the dictionary. The variable or field to atomically update if the specified key is not in the dictionary. The key for the value to get or add. The value to add to the dictionary the key is not found. The type of the keys contained in the collection. The type of the values contained in the collection. The value at the specified key or if the key was not present. Gets the value for the specified key from the dictionary, or if the key was not found, adds a new value to the dictionary. The variable or field to atomically update if the specified is not in the dictionary. The key for the value to retrieve or add. The function to execute to obtain the value to insert into the dictionary if the key is not found. This delegate will not be invoked more than once. The type of the keys contained in the collection. The type of the values contained in the collection. The value at the specified key or if the key was not present. Gets the value for the specified key from the dictionary, or if the key was not found, adds a new value to the dictionary. The variable or field to update if the specified is not in the dictionary. The key for the value to retrieve or add. The function to execute to obtain the value to insert into the dictionary if the key is not found. The argument to pass to the value factory. The type of the keys contained in the collection. The type of the values contained in the collection. The type of the argument supplied to the value factory. The value at the specified key or if the key was not present. Compares two immutable arrays for equality and, if they are equal, replaces one of the arrays. The destination, whose value is compared with and possibly replaced. The value that replaces the destination value if the comparison results in equality. The value that is compared to the value at . The type of element stored by the array. The original value in . Sets an array to the specified array and returns a reference to the original array, as an atomic operation. The array to set to the specified value. The value to which the parameter is set. The type of element stored by the array. The original value of . Sets an array to the specified array if the array has not been initialized. The array to set to the specified value. The value to which the parameter is set, if it's not initialized. The type of element stored by the array. if the array was assigned the specified value; otherwise, . Pushes a new element onto the stack. The stack to update. The value to push on the stack. The type of items in the stack. Adds the specified key and value to the dictionary if the key is not in the dictionary. The dictionary to update with the specified key and value. The key to add, if is not already defined in the dictionary. The value to add. The type of the keys contained in the collection. The type of the values contained in the collection. if the key is not in the dictionary; otherwise, . Atomically removes and returns the specified element at the head of the queue, if the queue is not empty. The variable or field to atomically update. Set to the value from the head of the queue, if the queue not empty. The type of items in the queue. if the queue is not empty and the head element is removed; otherwise, . Removes an element from the top of the stack, if there is an element to remove. The stack to update. Receives the value removed from the stack, if the stack is not empty. The type of items in the stack. if an element is removed from the stack; otherwise, . Removes the element with the specified key, if the key exists. The dictionary to update. The key to remove. Receives the value of the removed item, if the dictionary is not empty. The type of the keys contained in the collection. The type of the values contained in the collection. if the key was found and removed; otherwise, . Sets the specified key to the specified value if the specified key already is set to a specific value. The dictionary to update. The key to update. The new value to set. The current value for in order for the update to succeed. The type of the keys contained in the collection. The type of the values contained in the collection. if and are present in the dictionary and comparison was updated to ; otherwise, . Mutates a value in-place with optimistic locking transaction semantics via a specified transformation function. The transformation is retried as many times as necessary to win the optimistic locking race. The variable or field to be changed, which may be accessed by multiple threads. A function that mutates the value. This function should be side-effect free, as it may run multiple times when races occur with other threads. The type of data. if the location's value is changed by applying the result of the function; if the location's value remained the same because the last invocation of returned the existing value. Mutates an immutable array in-place with optimistic locking transaction semantics via a specified transformation function. The transformation is retried as many times as necessary to win the optimistic locking race. The immutable array to be changed. A function that produces the new array from the old. This function should be side-effect free, as it may run multiple times when races occur with other threads. The type of data in the immutable array. if the location's value is changed by applying the result of the function; if the location's value remained the same because the last invocation of returned the existing value. Mutates a value in-place with optimistic locking transaction semantics via a specified transformation function. The transformation is retried as many times as necessary to win the optimistic locking race. The variable or field to be changed, which may be accessed by multiple threads. A function that mutates the value. This function should be side-effect free, as it may run multiple times when races occur with other threads. The argument to pass to . The type of data. The type of argument passed to the . if the location's value is changed by applying the result of the function; if the location's value remained the same because the last invocation of returned the existing value. Mutates an immutable array in-place with optimistic locking transaction semantics via a specified transformation function. The transformation is retried as many times as necessary to win the optimistic locking race. The immutable array to be changed. A function that produces the new array from the old. This function should be side-effect free, as it may run multiple times when races occur with other threads. The argument to pass to . The type of data in the immutable array. The type of argument passed to the . if the location's value is changed by applying the result of the function; if the location's value remained the same because the last invocation of returned the existing value. Provides a set of initialization methods for instances of the class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Creates an empty immutable list. The type of items to be stored in the . An empty immutable list. Creates a new immutable list that contains the specified item. The item to prepopulate the list with. The type of items in the . A new that contains the specified item. Creates a new immutable list that contains the specified array of items. An array that contains the items to prepopulate the list with. The type of items in the . A new immutable list that contains the specified items. Creates a new immutable list that contains the items from the specified span of items. A span that contains the items to prepopulate the list with. The type of items stored by the collection. A new immutable list that contains the specified items. Creates a new immutable list builder. The type of items stored by the collection. The immutable collection builder. Creates a new immutable list that contains the specified items. The items to add to the list. The type of items in the . An immutable list that contains the specified items. Searches for the specified object and returns the zero-based index of the first occurrence within the list. The list to search. The object to locate in the list. The value can be null for reference types. The type of items in the list. The zero-based index of the first occurrence of item within the range of elements in the list that extends from index to the last element, if found; otherwise, -1. Searches for the specified object and returns the zero-based index of the first occurrence within the list. The list to search. The object to locate in the Immutable list. The value can be null for reference types. The equality comparer to use in the search. The type of items in the list. The zero-based index of the first occurrence of item within the range of elements in the immutable list that extends from index to the last element, if found; otherwise, -1. 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. The list to search. The object to locate in the Immutable list. The value can be null for reference types. The zero-based starting index of the search. 0 (zero) is valid in an empty list. The type of items in the list. The zero-based index of the first occurrence of item within the range of elements in the Immutable list that extends from index to the last element, if found; otherwise, -1. 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. The list to search. The object to locate in the Immutable list. The value can be null for reference types. The zero-based starting index of the search. 0 (zero) is valid in an empty list. The number of elements in the section to search. The type of items in the list. The zero-based index of the first occurrence of item within the range of elements in the Immutable list that extends from index to the last element, if found; otherwise, -1. Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list. The list to search. The object to locate in the Immutable list. The value can be null for reference types. The type of items in the list. The zero-based index of the last occurrence of item within the entire the Immutable list, if found; otherwise, -1. Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list. The list to search. The object to locate in the Immutable list. The value can be null for reference types. The equality comparer to use in the search. The type of items in the list. The zero-based index of the last occurrence of item within the entire the Immutable list, if found; otherwise, -1. 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. The list to search. The object to locate in the Immutable list. The value can be null for reference types. The zero-based starting index of the backward search. The type of items in the list. The zero-based index of the last occurrence of item within the range of elements in the Immutable list that extends from the first element to index, if found; otherwise, -1. 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. The list to search. The object to locate in the Immutable list. The value can be null for reference types. The zero-based starting index of the backward search. The number of elements in the section to search. The type of items in the list. The zero-based index of the last occurrence of item within the range of elements in the Immutable list that extends from the first element to index, if found; otherwise, -1. Removes the specified value from this list. The list to search. The value to remove. The type of items in the list. A new immutable list with the element removed, or this list if the element is not in this list. Removes the specified values from this list. The list to search. The items to remove if matches are found in this list. The type of items in the list. A new immutable list with the elements removed. Replaces the first equal element in the list with the specified element. The list to search. The element to replace. The element to replace the old element with. The type of items in the list. does not exist in the list. The new list -- even if the value being replaced is equal to the new value for that position. Enumerates a sequence and produces an immutable list of its contents. The sequence to enumerate. The type of the elements in the sequence. An immutable list that contains the items in the specified sequence. Creates an immutable list from the current contents of the builder's collection. The builder to create the immutable list from. The type of the elements in the list. An immutable list that contains the current contents in the builder's collection. Represents an immutable list, which is a strongly typed list of objects that can be accessed by index. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of elements in the list. Gets an empty immutable list. Adds the specified object to the end of the immutable list. The object to add. A new immutable list with the object added. Adds the elements of the specified collection to the end of the immutable list. The collection whose elements will be added to the end of the list. A new immutable list with the elements added. Searches the entire sorted list for an element using the default comparer and returns the zero-based index of the element. The object to locate. The value can be for reference types. The default comparer cannot find a comparer implementation of the for type T. The zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of . Searches the entire sorted list for an element using the specified comparer and returns the zero-based index of the element. The object to locate. The value can be null for reference types. The comparer implementation to use when comparing elements or null to use the default comparer. comparer is , and the default comparer cannot find an comparer implementation for type T. The zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of . 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. The zero-based starting index of the range to search. The length of the range to search. The object to locate. The value can be null for reference types. The comparer implementation to use when comparing elements, or to use the default comparer. index is less than 0 or is less than 0. index and do not denote a valid range in the list. is , and the default comparer cannot find an comparer implementation for type T. The zero-based index of item in the sorted list, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of . Removes all elements from the immutable list. An empty list that retains the same sort or unordered semantics that this instance has. Determines whether this immutable list contains the specified value. The value to locate. if the list contains the specified value; otherwise, . Converts the elements in the current immutable list to another type, and returns a list containing the converted elements. A delegate that converts each element from one type to another type. The type of the elements of the target array. A list of the target type containing the converted elements from the current . Copies the entire immutable list to a compatible one-dimensional array, starting at the beginning of the target array. The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. Copies the entire immutable list to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. The zero-based index in at which copying begins. Copies a range of elements from the immutable list to a compatible one-dimensional array, starting at the specified index of the target array. The zero-based index in the source immutable list at which copying begins. The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. The zero-based index in array at which copying begins. The number of elements to copy. Determines whether the immutable list contains elements that match the conditions defined by the specified predicate. The delegate that defines the conditions of the elements to search for. if the immutable list contains one or more elements that match the conditions defined by the specified predicate; otherwise, . Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire immutable list. The delegate that defines the conditions of the element to search for. The first element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type . Retrieves all the elements that match the conditions defined by the specified predicate. The delegate that defines the conditions of the elements to search for. An immutable list that contains all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty immutable list. 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. The zero-based starting index of the search. The number of elements in the section to search. The delegate that defines the conditions of the element to search for. The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, ?1. 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. The zero-based starting index of the search. The delegate that defines the conditions of the element to search for. The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, ?1. 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. The delegate that defines the conditions of the element to search for. The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, -1. Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire immutable list. The delegate that defines the conditions of the element to search for. The last element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type . 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. The zero-based starting index of the backward search. The number of elements in the section to search. The delegate that defines the conditions of the element to search for. The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, ?1. 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. The zero-based starting index of the backward search. The delegate that defines the conditions of the element to search for. The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, ?1. 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. The delegate that defines the conditions of the element to search for. The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, ?1. Performs the specified action on each element of the immutable list. The delegate to perform on each element of the immutable list. Returns an enumerator that iterates through the immutable list. An enumerator that can be used to iterate through the immutable list. Creates a shallow copy of a range of elements in the source immutable list. The zero-based index at which the range starts. The number of elements in the range. A shallow copy of a range of elements in the source immutable list. Searches for the specified object and returns the zero-based index of the first occurrence within the entire immutable list. The object to locate in the immutable list. The value can be for reference types. The zero-based index of the first occurrence of within the entire immutable list, if found; otherwise, ?1. 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. The object to locate in the list The value can be null for reference types. The zero-based starting index of the search. 0 (zero) is valid in an empty list. The number of elements in the section to search. The equality comparer to use in the search. The zero-based index of the first occurrence of item within the range of elements in the list that starts at index and contains count number of elements, if found; otherwise, -1. Inserts the specified object into the immutable list at the specified index. The zero-based index at which to insert the object. The object to insert. The new immutable list after the object is inserted. Inserts the elements of a collection into the immutable list at the specified index. The zero-based index at which to insert the elements. The collection whose elements should be inserted. The new immutable list after the elements are inserted. Gets a read-only reference to the element of the set at the given . The 0-based index of the element in the set to return. is negative or not less than . A read-only reference to the element at the given position. 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. The object to locate in the list. The value can be null for reference types. The zero-based starting index of the backward search. The number of elements in the section to search. The equality comparer to use in the search. The zero-based index of the last occurrence of item within the range of elements in the list that contains count number of elements and ends at index, if found; otherwise, -1. Removes the first occurrence of the specified object from this immutable list. The object to remove. A new list with the object removed, or this list if the specified object is not in this list. Removes the first occurrence of the object that matches the specified value from this immutable list. The value of the element to remove from the list. The equality comparer to use in the search. A new list with the object removed, or this list if the specified object is not in this list. Removes all the elements that match the conditions defined by the specified predicate. The delegate that defines the conditions of the elements to remove. The new list with the elements removed. Removes the element at the specified index. The zero-based index of the element to remove. A new list with the element removed. Removes a range of elements from this immutable list. The collection whose elements should be removed if matches are found in this list. A new list with the elements removed. Removes the specified values from this list. The items to remove if matches are found in this list. The equality comparer to use in the search. A new list with the elements removed. Removes a range of elements, starting from the specified index and containing the specified number of elements, from this immutable list. The starting index to begin removal. The number of elements to remove. A new list with the elements removed. Replaces the specified element in the immutable list with a new element. The element to replace. The element to replace with. does not exist in the immutable list. The new list with the replaced element, even if it is equal to the old element. Replaces the specified element in the immutable list with a new element. The element to replace in the list. The element to replace with. The comparer to use to check for equality. A new list with the object replaced, or this list if the specified object is not in this list. Reverses the order of the elements in the entire immutable list. The reversed list. Reverses the order of the elements in the specified range of the immutable list. The zero-based starting index of the range to reverse. The number of elements in the range to reverse. The reversed list. Replaces an element at a given position in the immutable list with the specified element. The position in the list of the element to replace. The element to replace the old element with. The new list with the replaced element, even if it is equal to the old element at that position. Sorts the elements in the entire immutable list using the default comparer. The sorted list. Sorts the elements in the entire immutable list using the specified comparer. The implementation to use when comparing elements, or to use the default comparer (). The sorted list. Sorts the elements in the entire immutable list using the specified comparer. The delegate to use when comparing elements. is . The sorted list. Sorts a range of elements in the immutable list using the specified comparer. The zero-based starting index of the range to sort. The length of the range to sort. The implementation to use when comparing elements, or to use the default comparer (). The sorted list. Adds the specified item to the immutable list. The item to add. Always thrown. Removes all items from the immutable list. Removes the first occurrence of a specific object from the immutable list. The object to remove. Always thrown. if was successfully removed from the list; otherwise, . This method also returns if is not found in the original list. Returns an enumerator that iterates through the immutable list. An enumerator that can be used to iterate through the list. Inserts an object in the immutable list at the specified index. The zero-based index at which should be inserted. The object to insert. Removes the value at the specified index. The zero-based index of the item to remove. Copies the entire immutable list to a compatible one-dimensional array, starting at the specified array index. The one-dimensional array that is the destination of the elements copied from immutable list. The zero-based index in at which copying begins. Returns an enumerator that iterates through the immutable list. An enumerator that can be used to iterate through the list. Adds an item to the immutable list. The object to add to the list. Always thrown. The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the list. Removes all items from the immutable list. Always thrown. Determines whether the immutable list contains a specific value. The object to locate in the list. if the object is found in the list; otherwise, . Determines the index of a specific item in the immutable list. The object to locate in the list. The index of if found in the list; otherwise, -1. Inserts an item into the immutable list at the specified index. The zero-based index at which should be inserted. The object to insert into the list. Always thrown. Removes the first occurrence of a specific object from the immutable list. The object to remove from the list. Always thrown. Removes the item at the specified index of the immutable list. The zero-based index of the item to remove. Always thrown. Adds the specified value to this immutable list. The value to add. A new list with the element added. Adds the specified values to this immutable list. The values to add. A new list with the elements added. Retrieves an empty list that has the same sorting and ordering semantics as this instance. An empty list that has the same sorting and ordering semantics as this instance. Inserts the specified element at the specified index in the immutable list. The index at which to insert the value. The element to insert. A new immutable list that includes the specified element. Inserts the specified elements at the specified index in the immutable list. The index at which to insert the elements. The elements to insert. A new immutable list that includes the specified elements. Removes the element with the specified value from the list. The value of the element to remove from the list. The comparer to use to compare elements for equality. A new with the specified element removed. Removes all the elements that match the conditions defined by the specified predicate. The delegate that defines the conditions of the elements to remove. A new immutable list with the elements removed. Removes the element at the specified index of the immutable list. The index of the element to remove. A new list with the element removed. Removes a range of elements from this immutable list that match the items specified. The range of items to remove from the list, if found. The equality comparer to use to compare elements. or is . An immutable list with the items removed. Removes the specified number of elements at the specified location from this list. The starting index of the range of elements to remove. The number of elements to remove. A new list with the elements removed. Replaces an element in the list with the specified element. The element to replace. The element to replace the old element with. The equality comparer to use in the search. does not exist in the list. The new list. Replaces an element in the list at a given position with the specified element. The position in the list of the element to replace. The element to replace the old element with. The new list. Creates a list that has the same contents as this list and can be efficiently mutated across multiple operations using standard mutable interfaces. The created list with the same contents as this list. Determines whether every element in the immutable list matches the conditions defined by the specified predicate. The delegate that defines the conditions to check against the elements. if every element in the immutable list matches the conditions defined by the specified predicate; otherwise, . If the list has no elements, the return value is . Gets the number of elements contained in the list. The number of elements in the list. Gets a value that indicates whether this list is empty. if the list is empty; otherwise, . Gets the element at the specified index of the list. The index of the element to retrieve. In a get operation, is negative or not less than . The element at the specified index. Gets a value indicating whether the is read-only. if the is read-only; otherwise, . Gets or sets the value at the specified index. The zero-based index of the item to access. Thrown from getter when is negative or not less than . Always thrown from the setter. Value stored in the specified index. This type is immutable, so it is always thread-safe. See the interface. Boolean value determining whether the collection is thread-safe. See . Object used for synchronizing access to the collection. Gets a value indicating whether the has a fixed size. if the has a fixed size; otherwise, . Gets a value indicating whether the is read-only. if the is read-only; otherwise, . Gets or sets the at the specified index. The index. Thrown from getter when is negative or not less than . Always thrown from the setter. The value at the specified index. Represents a list that mutates with little or no memory allocations and that can produce or build on immutable list instances very efficiently. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Adds an item to the immutable list. The item to add to the list. Adds a series of elements to the end of this list. The elements to add to the end of the list. Searches the entire for an element using the default comparer and returns the zero-based index of the element. The object to locate. The value can be null for reference types. The default comparer cannot find an implementation of the generic interface or the interface for type T. The zero-based index of item in the , if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than . Searches the entire for an element using the specified comparer and returns the zero-based index of the element. The object to locate. This value can be null for reference types. The implementation to use when comparing elements, or for the default comparer. is , and the default comparer cannot find an implementation of the generic interface or the interface for type T. The zero-based index of item in the , if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than . Searches the specified range of the for an element using the specified comparer and returns the zero-based index of the element. The zero-based starting index of the range to search. The length of the range to search. The object to locate. This value can be null for reference types. The implementation to use when comparing elements, or for the default comparer. is less than 0. -or- is less than 0. and do not denote a valid range in the . is , and the default comparer cannot find an implementation of the generic interface or the interface for type T. The zero-based index of item in the , if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than . Removes all items from the immutable list. Determines whether the immutable list contains a specific value. The object to locate in the list. if item is found in the list; otherwise, . Creates a new immutable list from the list represented by this builder by using the converter function. The converter function. The type of the output of the delegate converter function. A new immutable list from the list represented by this builder. Copies the entire immutable list to a compatible one-dimensional array, starting at the beginning of the target array. The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. Copies the entire immutable list to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. The zero-based index in array at which copying begins. Copies the entire immutable list to a compatible one-dimensional array, starting at the specified index of the target array. The zero-based index in the source immutable list at which copying begins. The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. The zero-based index in at which copying begins. The number of elements to copy. Determines whether the immutable list contains elements that match the conditions defined by the specified predicate. The delegate that defines the conditions of the elements to search for. if the immutable list contains one or more elements that match the conditions defined by the specified predicate; otherwise, . Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire immutable list. The delegate that defines the conditions of the element to search for. The first element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type . Retrieves all the elements that match the conditions defined by the specified predicate. The delegate that defines the conditions of the elements to search for. An immutable list containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty immutable list. 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. The zero-based starting index of the search. The number of elements in the section to search. The delegate that defines the conditions of the element to search for. The zero-based index of the first occurrence of an element that matches the conditions defined by , if found; otherwise, -1. 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. The zero-based starting index of the search. The delegate that defines the conditions of the element to search for. The zero-based index of the first occurrence of an element that matches the conditions defined by , if found; otherwise, -1. 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. The delegate that defines the conditions of the element to search for. The zero-based index of the first occurrence of an element that matches the conditions defined by , if found; otherwise, -1. Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire immutable list. The delegate that defines the conditions of the element to search for. The last element that matches the conditions defined by the specified predicate, found; otherwise, the default value for type . 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. The zero-based starting index of the backward search. The number of elements in the section to search. The delegate that defines the conditions of the element to search for. The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, -1. 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. The zero-based starting index of the backward search. The delegate that defines the conditions of the element to search for. The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, -1. 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. The delegate that defines the conditions of the element to search for. The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, -1. Performs the specified action on each element of the list. The delegate to perform on each element of the list. Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the list. Creates a shallow copy of a range of elements in the source immutable list. The zero-based index at which the range starts. The number of elements in the range. A shallow copy of a range of elements in the source immutable list. Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list. The object to locate in the immutable list. The value can be for reference types. The zero-based index of the first occurrence of within the range of elements in the immutable list, if found; otherwise, -1. 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. The object to locate in the immutable list. The value can be for reference types. The zero-based starting index of the search. 0 (zero) is valid in an empty list. The zero-based index of the first occurrence of item within the range of elements in the immutable list that extends from to the last element, if found; otherwise, -1. 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 starts at the specified index and contains the specified number of elements. The object to locate in the immutable list. The value can be for reference types. The zero-based starting index of the search. 0 (zero) is valid in an empty list. The number of elements in the section to search. The zero-based index of the first occurrence of item within the range of elements in the immutable list that starts at and contains number of elements, if found; otherwise, -1. Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the that starts at the specified index and contains the specified number of elements. The object to locate in the immutable list. The value can be for reference types. The zero-based starting index of the search. 0 (zero) is valid in an empty list. The number of elements to search. The value comparer to use for comparing elements for equality. The zero-based index of the first occurrence of item within the range of elements in the immutable list that starts at and contains number of elements, if found; otherwise, -1 Inserts an item to the immutable list at the specified index. The zero-based index at which should be inserted. The object to insert into the immutable list. Inserts the elements of a collection into the immutable list at the specified index. The zero-based index at which the new elements should be inserted. The collection whose elements should be inserted into the immutable list. The collection itself cannot be , but it can contain elements that are null, if type T is a reference type. Gets a read-only reference to the value for a given into the list. The index of the desired element. A read-only reference to the value at the specified . Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list. The object to locate in the immutable list. The value can be for reference types. The zero-based index of the last occurrence of within the entire immutable list, if found; otherwise, -1. 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. The object to locate in the immutable list. The value can be for reference types. The zero-based starting index of the backward search. The zero-based index of the last occurrence of within the range of elements in the immutable list that extends from the first element to , if found; otherwise, -1. 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 contains the specified number of elements and ends at the specified index. The object to locate in the immutable list. The value can be for reference types. The zero-based starting index of the backward search. The number of elements in the section to search. The zero-based index of the last occurrence of within the range of elements in the immutable list that contains number of elements and ends at , if found; otherwise, -1. 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 contains the specified number of elements and ends at the specified index. The object to locate in the immutable list. The value can be for reference types. The zero-based starting index of the search. 0 (zero) is valid in an empty list. The number of elements to search. The value comparer to use for comparing elements for equality. The zero-based index of the first occurrence of item within the range of elements in the immutable list that starts at and contains number of elements, if found; otherwise, -1 Removes the first occurrence of a specific object from the immutable list. The object to remove from the list. if item was successfully removed from the list; otherwise, . This method also returns if item is not found in the list. Removes the first occurrence matching the specified value from this list. The item to remove. The equality comparer to use in the search. If , is used. A value indicating whether the specified element was found and removed from the collection. Removes all the elements that match the conditions defined by the specified predicate. The delegate that defines the conditions of the elements to remove. The number of elements removed from the immutable list. Removes the item at the specified index of the immutable list. The zero-based index of the item to remove from the list. Removes any first occurrences of the specified values from this list. The items to remove if matches are found in this list. Removes any first occurrences of the specified values from this list. The items to remove if matches are found in this list. The equality comparer to use in the search. If , is used. Removes the specified range of values from this list. The starting index to begin removal. The number of elements to remove. Replaces the first equal element in the list with the specified element. The element to replace. The element to replace the old element with. The old value does not exist in the list. Replaces the first equal element in the list with the specified element. The element to replace. The element to replace the old element with. The equality comparer to use in the search. If , is used. The old value does not exist in the list. Reverses the order of the elements in the entire immutable list. Reverses the order of the elements in the specified range of the immutable list. The zero-based starting index of the range to reverse. The number of elements in the range to reverse. Sorts the elements in the entire immutable list by using the default comparer. Sorts the elements in the entire immutable list by using the specified comparer. The implementation to use when comparing elements, or to use the default comparer (). Sorts the elements in the entire immutable list by using the specified comparison object. The object to use when comparing elements. is . Sorts the elements in a range of elements in the immutable list by using the specified comparer. The zero-based starting index of the range to sort. The length of the range to sort. The implementation to use when comparing elements, or to use the default comparer (). Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Copies the elements of the list to an array, starting at a particular array index. The one-dimensional array that is the destination of the elements copied from the list. The array must have zero-based indexing. The zero-based index in at which copying begins. Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Adds an item to the list. The object to add to the list. The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection. Removes all items from the list. Determines whether the list contains a specific value. The object to locate in the list. if the is found in the list; otherwise, . Determines the index of a specific item in the list. The object to locate in the list. The index of if found in the list; otherwise, -1. Inserts an item to the list at the specified index. The zero-based index at which should be inserted. The object to insert into the list. Removes the first occurrence of a specific object from the list. The object to remove from the list. Creates an immutable list based on the contents of this instance. An immutable list. Determines whether every element in the immutable list matches the conditions defined by the specified predicate. The delegate that defines the conditions to check against the elements. if every element in the immutable list matches the conditions defined by the specified predicate; otherwise, . If the list has no elements, the return value is . Gets the number of elements in this immutable list. The number of elements in this list. Gets or sets the value for a given index in the list. The index of the item to get or set. The value at the specified index. Gets a value that indicates whether this instance is read-only. Always . Gets a value that indicates whether access to the is synchronized (thread safe). if access to the is synchronized (thread safe); otherwise, . Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . Gets a value that indicates whether the has a fixed size. if the has a fixed size; otherwise, . Gets a value that indicates whether the is read-only. if the is read-only; otherwise, . Gets or sets the at the specified index. The index. The object at the specified index. Enumerates the contents of a binary tree. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Releases the resources used by the current instance of the class. Advances enumeration to the next element of the immutable list. if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the list. Sets the enumerator to its initial position, which is before the first element in the immutable list. Gets the element at the current position of the enumerator. The element at the current position of the enumerator. The current element. The element in the collection at the current position of the enumerator. Provides a set of initialization methods for instances of the class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Creates an empty immutable queue. The type of items to be stored in the immutable queue. An empty immutable queue. Creates a new immutable queue that contains the specified item. The item to prepopulate the queue with. The type of items in the immutable queue. A new immutable queue that contains the specified item. Creates a new immutable queue that contains the specified array of items. An array that contains the items to prepopulate the queue with. The type of items in the immutable queue. A new immutable queue that contains the specified items. Creates a new immutable queue that contains the specified array of items. A span that contains the items to prepopulate the queue with. The type of items in the immutable queue. A new immutable queue that contains the specified items. Creates a new immutable queue that contains the specified items. The items to add to the queue before immutability is applied. The type of elements in the queue. An immutable queue that contains the specified items. Removes the item at the beginning of the immutable queue, and returns the new queue. The queue to remove the item from. When this method returns, contains the item from the beginning of the queue. The type of elements in the immutable queue. The stack is empty. The new queue with the item removed. Represents an immutable queue. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of elements in the queue. Removes all objects from the immutable queue. The empty immutable queue. Removes the element at the beginning of the immutable queue, and returns the new queue. The queue is empty. The new immutable queue; never . Removes the item at the beginning of the immutable queue, and returns the new queue. When this method returns, contains the element from the beginning of the queue. The queue is empty. The new immutable queue with the beginning element removed. Adds an element to the end of the immutable queue, and returns the new queue. The element to add. The new immutable queue. Returns an enumerator that iterates through the immutable queue. An enumerator that can be used to iterate through the queue. Returns the element at the beginning of the immutable queue without removing it. The queue is empty. The element at the beginning of the queue. Gets a read-only reference to the element at the front of the queue. The queue is empty. Read-only reference to the element at the front of the queue. Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Removes all elements from the immutable queue. The empty immutable queue. Removes the element at the beginning of the immutable queue, and returns the new queue. The queue is empty. The new immutable queue; never . Adds an element to the end of the immutable queue, and returns the new queue. The element to add. The new immutable queue. Gets an empty immutable queue. An empty immutable queue. Gets a value that indicates whether this immutable queue is empty. NuGet package: System.Collections.Immutable (about immutable collections and how to install) if this queue is empty; otherwise, . Enumerates the contents of an immutable queue without allocating any memory. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Advances the enumerator to the next element of the immutable queue. if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the queue. Gets the element at the current position of the enumerator. The element at the current position of the enumerator. Provides a set of initialization methods for instances of the class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Creates an empty immutable sorted dictionary. The type of keys stored by the dictionary. The type of values stored by the dictionary. An empty immutable sorted dictionary. Creates an empty immutable sorted dictionary that uses the specified key comparer. The implementation to use to determine the equality of keys in the dictionary. The type of keys stored by the dictionary. The type of values stored by the dictionary. An empty immutable sorted dictionary. Creates an empty immutable sorted dictionary that uses the specified key and value comparers. The implementation to use to determine the equality of keys in the dictionary. The implementation to use to determine the equality of values in the dictionary. The type of keys stored by the dictionary. The type of values stored by the dictionary. An empty immutable sorted dictionary. Creates a new immutable sorted dictionary builder. The type of keys stored by the dictionary. The type of values stored by the dictionary. The immutable collection builder. Creates a new immutable sorted dictionary builder. The key comparer. The type of keys stored by the dictionary. The type of values stored by the dictionary. The immutable collection builder. Creates a new immutable sorted dictionary builder. The key comparer. The value comparer. The type of keys stored by the dictionary. The type of values stored by the dictionary. The immutable collection builder. Creates a new immutable sorted dictionary from the specified range of items with the specified key comparer. The comparer implementation to use to evaluate keys for equality and sorting. The items to add to the sorted dictionary. The type of keys stored in the dictionary. The type of values stored in the dictionary. The new immutable sorted dictionary that contains the specified items and uses the specified key comparer. Creates a new immutable sorted dictionary from the specified range of items with the specified key and value comparers. The comparer implementation to use to compare keys for equality and sorting. The comparer implementation to use to compare values for equality. The items to add to the sorted dictionary before it's immutable. The type of keys stored in the dictionary. The type of values stored in the dictionary. An immutable sorted dictionary that contains the specified items and uses the specified comparers. Creates an immutable sorted dictionary that contains the specified items and uses the default comparer. The items to add to the sorted dictionary before it's immutable. The type of keys stored in the dictionary. The type of values stored in the dictionary. An immutable sorted dictionary that contains the specified items. Enumerates a sequence of key/value pairs and produces an immutable sorted dictionary of its contents. The sequence of key/value pairs to enumerate. The type of the keys in the dictionary. The type of the values in the dictionary. An immutable sorted dictionary that contains the key/value pairs in the specified sequence. Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key comparer. The sequence of key/value pairs to enumerate. The key comparer to use when building the immutable dictionary. The type of the keys in the dictionary. The type of the values in the dictionary. An immutable sorted dictionary that contains the key/value pairs in the specified sequence. Enumerates a sequence of key/value pairs and produces an immutable sorted dictionary of its contents by using the specified key and value comparers. The sequence of key/value pairs to enumerate. The key comparer to use when building the immutable dictionary. The value comparer to use for the immutable dictionary. The type of the keys in the dictionary. The type of the values in the dictionary. An immutable sorted dictionary that contains the key/value pairs in the specified sequence. Creates an immutable sorted dictionary from the current contents of the builder's dictionary. The builder to create the immutable sorted dictionary from. The type of the keys in the dictionary. The type of the values in the dictionary. An immutable sorted dictionary that contains the current contents in the builder's dictionary. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents. The sequence to enumerate to generate the dictionary. The function that will produce the key for the dictionary from each sequence element. The function that will produce the value for the dictionary from each sequence element. The type of the elements in the sequence. The type of the keys in the resulting dictionary. The type of the values in the resulting dictionary. An immutable sorted dictionary that contains the items in the specified sequence. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer. The sequence to enumerate to generate the dictionary. The function that will produce the key for the dictionary from each sequence element. The function that will produce the value for the dictionary from each sequence element. The key comparer to use for the dictionary. The type of the elements in the sequence. The type of the keys in the resulting dictionary. The type of the values in the resulting dictionary. An immutable dictionary that contains the items in the specified sequence. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers. The sequence to enumerate to generate the dictionary. The function that will produce the key for the dictionary from each sequence element. The function that will produce the value for the dictionary from each sequence element. The key comparer to use for the dictionary. The value comparer to use for the dictionary. The type of the elements in the sequence. The type of the keys in the resulting dictionary. The type of the values in the resulting dictionary. An immutable sorted dictionary that contains the items in the specified sequence. Represents an immutable sorted dictionary. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of the key contained in the dictionary. The type of the value contained in the dictionary. Gets an empty immutable sorted dictionary. Adds an element with the specified key and value to the immutable sorted dictionary. The key of the entry to add. The value of entry to add. The given key already exists in the dictionary but has a different value. A new immutable sorted dictionary that contains the additional key/value pair. Adds the specific key/value pairs to the immutable sorted dictionary. The key/value pairs to add. One of the given keys already exists in the dictionary but has a different value. A new immutable dictionary that contains the additional key/value pairs. Retrieves an empty immutable sorted dictionary that has the same ordering and key/value comparison rules as this dictionary instance. An empty dictionary with equivalent ordering and key/value comparison rules. Determines whether this immutable sorted dictionary contains the specified key/value pair. The key/value pair to locate. if the specified key/value pair is found in the dictionary; otherwise, . Determines whether this immutable sorted map contains the specified key. The key to locate. if the immutable dictionary contains the specified key; otherwise, . Determines whether the immutable sorted dictionary contains an element with the specified value. The value to locate. The value can be for reference types. if the dictionary contains an element with the specified value; otherwise, . Returns an enumerator that iterates through the immutable sorted dictionary. An enumerator that can be used to iterate through the dictionary. Removes the element with the specified value from the immutable sorted dictionary. The value of the element to remove. A new immutable dictionary with the specified element removed; or this instance if the specified value cannot be found in the dictionary. Removes the elements with the specified keys from the immutable sorted dictionary. The keys of the elements to remove. A new immutable dictionary with the specified keys removed; or this instance if the specified keys cannot be found in the dictionary. Sets the specified key and value in the immutable sorted dictionary, possibly overwriting an existing value for the given key. The key of the entry to add. The key value to set. A new immutable sorted dictionary that contains the specified key/value pair. Sets the specified key/value pairs in the immutable sorted dictionary, possibly overwriting existing values for the keys. The key/value pairs to set in the dictionary. If any of the keys already exist in the dictionary, this method will overwrite their previous values. An immutable dictionary that contains the specified key/value pairs. Adds an item to the . The object to add to the . Removes all items from the . Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. Removes the first occurrence of a specific object from the . The object to remove from the . if was successfully removed from the ; otherwise, . This method also returns if is not found in the original . Adds an element with the provided key and value to the generic dictionary. The object to use as the key of the element to add. The object to use as the value of the element to add. is . An element with the same key already exists in the . The is read-only. Removes the element with the specified key from the generic dictionary. The key of the element to remove. is . The is read-only. if the element is successfully removed; otherwise, . This method also returns if was not found in the original generic dictionary. Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Copies the elements of the dictionary to an array, starting at a particular array index. The one-dimensional array that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. The zero-based index in at which copying begins. Adds an element with the provided key and value to the dictionary object. The object to use as the key of the element to add. The object to use as the value of the element to add. Clears this instance. The dictionary object is read-only. Determines whether the immutable dictionary object contains an element with the specified key. The key to locate in the dictionary object. if the dictionary contains an element with the key; otherwise, . Returns an object for the immutable dictionary object. An enumerator object for the dictionary object. Removes the element with the specified key from the immutable dictionary object. The key of the element to remove. Returns an enumerator that iterates through a collection. An enumerator object that can be used to iterate through the collection. See the interface. Key of the entry to be added. Value of the entry to be added. The instance. See the interface. Sequence of key/value pairs to be added. The instance. See the interface. The instance. See the interface. Key of entry to be removed. The instance. See the interface. Sequence of keys to be removed. The instance. See the interface. Key of entry to be updated. Value of entry to be updated. The instance. Applies a given set of key-value pairs to an immutable dictionary, replacing any conflicting keys in the resulting dictionary. A set of key-value pairs to set on the map. The instance. Creates an immutable sorted dictionary with the same contents as this dictionary that can be efficiently mutated across multiple operations by using standard mutable interfaces. A collection with the same contents as this dictionary. Determines whether this dictionary contains a specified key. The key to search for. The matching key located in the dictionary if found, or equalkey if no match is found. if a match for is found; otherwise, . Gets the value associated with the specified key. The key whose value will be retrieved. When this method returns, contains the value associated with the specified key, if the key is found; otherwise, contains the default value for the type of the parameter. if the dictionary contains an element with the specified key; otherwise, . Returns a read-only reference to the value associated with the provided . Key of the entry to be looked up. The is not present. A read-only reference to the value associated with the provided . Gets an instance of the immutable sorted dictionary that uses the specified key comparer. The key comparer to use. An instance of the immutable dictionary that uses the given comparer. Gets an instance of the immutable sorted dictionary that uses the specified key and value comparers. The key comparer to use. The value comparer to use. An instance of the immutable dictionary that uses the given comparers. Gets the number of key/value pairs in the immutable sorted dictionary. The number of key/value pairs in the dictionary. Gets a value that indicates whether this instance of the immutable sorted dictionary is empty. if this instance is empty; otherwise, . Gets the associated with the specified key. The key to retrieve the value for. The value associated with the specified key. If no results are found, the operation throws an exception. Gets the key comparer for the immutable sorted dictionary. The key comparer for the dictionary. Gets the keys in the immutable sorted dictionary. The keys in the immutable dictionary. Gets a value indicating whether the is read-only. if the is read-only; otherwise, . Gets or sets the with the specified key. The object to use as the key of the element to access. An object of type associated with the . Gets the keys. A collection containing the keys. Gets the values. A collection containing the values. Gets a value indicating whether access to the is synchronized (thread safe). if access to the is synchronized (thread-safe); otherwise, . Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . Gets a value indicating whether the object has a fixed size. if the object has a fixed size; otherwise, . Gets a value indicating whether the is read-only. if the is read-only; otherwise, . Gets or sets the element with the specified key. The key of the element to be accessed. Value stored under the specified key. Gets an containing the keys of the . An containing the keys of the object that implements . Gets an containing the values in the . An containing the values in the object that implements . Gets the value comparer used to determine whether values are equal. The value comparer used to determine whether values are equal. Gets the values in the immutable sorted dictionary. The values in the dictionary. Represents a sorted dictionary that mutates with little or no memory allocations and that can produce or build on immutable sorted dictionary instances very efficiently. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Adds an element that has the specified key and value to the immutable sorted dictionary. The key of the element to add. The value of the element to add. Adds the specified item to the immutable sorted dictionary. The object to add to the dictionary. Adds a sequence of values to the immutable sorted dictionary. The items to add to the dictionary. Removes all items from the immutable sorted dictionary. Determines whether the immutable sorted dictionary contains a specific value. The object to locate in the dictionary. if is found in the dictionary; otherwise, . Determines whether the immutable sorted dictionary contains an element with the specified key. The key to locate in the dictionary. if the dictionary contains an element with the key; otherwise, . Determines whether the immutable sorted dictionary contains an element with the specified value. The value to locate in the dictionary. The value can be for reference types. if the immutable sorted dictionary contains an element with the specified value; otherwise, . Returns an enumerator that iterates through the immutable sorted dictionary. An enumerator that can be used to iterate through the dictionary. Gets the value for a given key if a matching key exists in the dictionary; otherwise the default value. The key to search for. The value for the key, or default(TValue) if no matching key was found. Gets the value for a given key if a matching key exists in the dictionary; otherwise the default value. The key to search for. The default value to return if no matching key is found in the dictionary. The value for the key, or if no matching key was found. Removes the element with the specified key from the immutable sorted dictionary. The key of the element to remove. if the element is successfully removed; otherwise, . This method also returns if was not found in the original dictionary. Removes the first occurrence of a specific object from the immutable sorted dictionary. The object to remove from the dictionary. if was successfully removed from the dictionary; otherwise, . This method also returns if is not found in the dictionary. Removes any entries with keys that match those found in the specified sequence from the immutable sorted dictionary. The keys for entries to remove from the dictionary. See . The one-dimensional array that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. The zero-based index in at which copying begins. See . An enumerator that can be used to iterate through the collection. Copies the elements of the dictionary to an array, starting at a particular array index. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The one-dimensional array that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. The zero-based index in at which copying begins. Adds an element with the provided key and value to the dictionary object. The key of the element to add. The value of the element to add. Determines whether the dictionary object contains an element with the specified key. The key to locate. if the dictionary contains an element with the key; otherwise, . Returns an object for the dictionary. An object for the dictionary. Removes the element with the specified key from the dictionary. The key of the element to remove. Returns an enumerator that iterates through a collection. An enumerator object that can be used to iterate through the collection. Creates an immutable sorted dictionary based on the contents of this instance. An immutable sorted dictionary. Determines whether this dictionary contains a specified key. The key to search for. The matching key located in the dictionary if found, or equalkey if no match is found. if a match for is found; otherwise, . Gets the value associated with the specified key. The key whose value will be retrieved. When this method returns, contains the value associated with the specified key, if the key is found; otherwise, contains the default value for the type of the parameter. This parameter is passed uninitialized. if the object that implements the dictionary contains an element with the specified key; otherwise, . Returns a read-only reference to the value associated with the provided . Key of the entry to be looked up. The is not present. A read-only reference to the value associated with the provided . Gets the number of elements in this immutable sorted dictionary. The number of elements in this dictionary. Gets or sets the value for a specified key in the immutable sorted dictionary. The key to retrieve the value for. The value associated with the given key. Gets or sets the key comparer. The key comparer. Gets a strongly typed, read-only collection of elements. A strongly typed, read-only collection of elements. Gets a value that indicates whether this instance is read-only. Always . Returns a collection containing all keys stored in the dictionary. See . A collection containing all keys stored in the dictionary. Returns a collection containing all values stored in the dictionary. See . A collection containing all values stored in the dictionary. Gets a value that indicates whether access to the is synchronized (thread safe). if access to the is synchronized (thread safe); otherwise, . Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . Gets a value that indicates whether the object has a fixed size. if the object has a fixed size; otherwise, . Gets a value that indicates whether the is read-only. if the is read-only; otherwise, . Gets or sets the element with the specified key. The key. The value associated with the specified key. Gets an containing the keys of the . An containing the keys of the object that implements . Gets an containing the values in the . An containing the values in the object that implements . Gets or sets the value comparer. The value comparer. Gets a collection that contains the values of the immutable sorted dictionary. A collection that contains the values of the object that implements the dictionary. Enumerates the contents of a binary tree. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Releases the resources used by the current instance of the class. Advances the enumerator to the next element of the immutable sorted dictionary. if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the sorted dictionary. Sets the enumerator to its initial position, which is before the first element in the immutable sorted dictionary. Gets the element at the current position of the enumerator. The element at the current position of the enumerator. The current element. The element in the collection at the current position of the enumerator. Provides a set of initialization methods for instances of the class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Creates an empty immutable sorted set. The type of items to be stored in the immutable set. An empty immutable sorted set. Creates a new immutable sorted set that contains the specified item. The item to prepopulate the set with. The type of items in the immutable set. A new immutable set that contains the specified item. Creates a new immutable sorted set that contains the specified array of items. An array that contains the items to prepopulate the set with. The type of items in the immutable set. A new immutable set that contains the specified items. Creates an empty immutable sorted set that uses the specified comparer. The implementation to use when comparing items in the set. The type of items in the immutable set. An empty immutable set. Creates a new immutable sorted set that contains the specified item and uses the specified comparer. The implementation to use when comparing items in the set. The item to prepopulate the set with. The type of items stored in the immutable set. A new immutable set that contains the specified item. Creates a new immutable sorted set that contains the specified array of items and uses the specified comparer. The implementation to use when comparing items in the set. An array that contains the items to prepopulate the set with. The type of items in the immutable set. A new immutable set that contains the specified items. Creates a new immutable collection prefilled with the specified items. The comparer. The items to prepopulate. The type of items stored by the collection. The new immutable collection. Creates a new immutable sorted set that contains the specified array of items. A span that contains the items to prepopulate the set with. The type of items in the immutable set. A new immutable set that contains the specified items. Returns a collection that can be used to build an immutable sorted set. The type of items stored by the collection. The immutable collection builder. Returns a collection that can be used to build an immutable sorted set. The comparer used to compare items in the set for equality. The type of items stored by the collection. The immutable collection. Creates a new immutable collection that contains the specified items. The comparer to use to compare elements in this set. The items to add to the set before it's immutable. The type of items stored by the collection. The new immutable set that contains the specified items. Creates a new immutable collection that contains the specified items. The items to add to the set with before it's immutable. The type of items stored by the collection. The new immutable set that contains the specified items. Enumerates a sequence and produces an immutable sorted set of its contents. The sequence to enumerate. The type of the elements in the sequence. An immutable sorted set that contains the items in the specified sequence. Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer. The sequence to enumerate. The comparer to use for initializing and adding members to the sorted set. The type of the elements in the sequence. An immutable sorted set that contains the items in the specified sequence. Creates an immutable sorted set from the current contents of the builder's set. The builder to create the immutable sorted set from. The type of the elements in the immutable sorted set. An immutable sorted set that contains the current contents in the builder's set. Represents an immutable sorted set implementation. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of elements in the set. Gets an empty immutable sorted set. Adds the specified value to this immutable sorted set. The value to add. A new set with the element added, or this set if the element is already in this set. Removes all elements from the immutable sorted set. An empty set with the elements removed. Determines whether this immutable sorted set contains the specified value. The value to check for. if the set contains the specified value; otherwise, . Removes a specified set of items from this immutable sorted set. The items to remove from this set. A new set with the items removed; or the original set if none of the items were in the set. Returns an enumerator that iterates through the immutable sorted set. An enumerator that can be used to iterate through the set. Gets the position within this immutable sorted set that the specified value appears in. The value whose position is being sought. The index of the specified in the sorted set, if is found. If is not found and is less than one or more elements in this set, this method returns a negative number that is the bitwise complement of the index of the first element that is larger than value. If is not found and is greater than any of the elements in the set, this method returns a negative number that is the bitwise complement of the index of the last element plus 1. Creates an immutable sorted set that contains elements that exist both in this set and in the specified set. The set to intersect with this one. A new immutable sorted set that contains any elements that exist in both sets. Determines whether the current immutable sorted set is a proper (strict) subset of the specified collection. The collection to compare to the current set. if the current set is a proper subset of ; otherwise, . Determines whether the current immutable sorted set is a proper superset of a specified collection. The collection to compare to the current set. if the current set is a proper superset of ; otherwise, . Determines whether the current immutable sorted set is a subset of a specified collection. The collection to compare to the current set. if the current set is a subset of ; otherwise, . Determines whether the current immutable sorted set is a superset of a specified collection. The collection to compare to the current set. if the current set is a superset of ; otherwise, . Gets a read-only reference of the element of the set at the given . The 0-based index of the element in the set to return. A read-only reference of the element at the given position. Determines whether the current immutable sorted set and a specified collection share common elements. The collection to compare to the current set. if the current set and share at least one common element; otherwise, . Removes the specified value from this immutable sorted set. The element to remove. A new immutable sorted set with the element removed, or this set if the element was not found in the set. Returns an that iterates over this immutable sorted set in reverse order. An enumerator that iterates over the immutable sorted set in reverse order. Determines whether the current immutable sorted set and the specified collection contain the same elements. The collection to compare to the current set. if the sets are equal; otherwise, . Creates an immutable sorted set that contains elements that exist either in this set or in a given sequence, but not both. The other sequence of items. The new immutable sorted set. Adds the specified value to the collection. The value to add. Removes all the items from the collection. Copies the elements of the collection to an array, starting at a particular array index. The one-dimensional array that is the destination of the elements copied from collection. The array must have zero-based indexing. The zero-based index in at which copying begins. Removes the first occurrence of a specific object from the collection. The object to remove from the collection. if was successfully removed from the collection; otherwise, . Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Inserts an item in the set at the specified index. The zero-based index at which should be inserted. The object to insert into the set. Removes the item at the specified index. The zero-based index of the item to remove. Adds an element to the current set and returns a value to indicate if the element was successfully added. The element to add to the set. if the element is added to the set; if the element is already in the set. Removes all elements in the specified collection from the current set. The collection of items to remove from the set. Modifies the current set so that it contains only elements that are also in a specified collection. The collection to compare to the current set. Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. The collection to compare to the current set. Modifies the current set so that it contains all elements that are present in either the current set or the specified collection. The collection to compare to the current set. Copies the elements of the set to an array, starting at a particular array index. The one-dimensional array that is the destination of the elements copied from the set. The array must have zero-based indexing. The zero-based index in at which copying begins. Returns an enumerator that iterates through a collection. An enumerator object that can be used to iterate through the collection. Adds an item to the set. The object to add to the set. The set is read-only or has a fixed size. The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection. Removes all items from the set. Thrown in all cases. Determines whether the set contains a specific value. The object to locate in the set. if the object is found in the set; otherwise, . Determines the index of a specific item in the set. The object to locate in the set. The index of if found in the list; otherwise, -1. Inserts an item into the set at the specified index. The zero-based index at which should be inserted. The object to insert into the set. The set is read-only or has a fixed size. Removes the first occurrence of a specific object from the set. The object to remove from the set. The set is read-only or has a fixed size. Removes the item at the specified index of the set. The zero-based index of the item to remove. The set is read-only or has a fixed size. Adds the specified element to this immutable set. The element to add. A new set with the element added, or this set if the element is already in the set. Retrieves an empty immutable set that has the same sorting and ordering semantics as this instance. An empty set that has the same sorting and ordering semantics as this instance. Removes the elements in the specified collection from the current immutable set. The items to remove from this set. The new set with the items removed; or the original set if none of the items were in the set. Creates an immutable set that contains elements that exist in both this set and the specified set. The collection to compare to the current set. A new immutable set that contains any elements that exist in both sets. Removes the specified element from this immutable set. The element to remove. A new set with the specified element removed, or the current set if the element cannot be found in the set. Creates an immutable set that contains only elements that are present either in the current set or in the specified collection, but not both. The collection to compare to the current set. A new set that contains the elements that are present only in the current set or in the specified collection, but not both. Creates a new immutable set that contains all elements that are present in either the current set or in the specified collection. The collection to add elements from. A new immutable set with the items added; or the original set if all the items were already in the set. Creates a collection that has the same contents as this immutable sorted set that can be efficiently manipulated by using standard mutable interfaces. The sorted set builder. Searches the set for a given value and returns the equal value it finds, if any. The value to search for. The value from the set that the search found, or the original value if the search yielded no match. A value indicating whether the search was successful. Adds a given set of items to this immutable sorted set. The items to add. The new set with the items added; or the original set if all the items were already in the set. Returns the immutable sorted set that has the specified key comparer. The comparer to check for. The immutable sorted set that has the specified key comparer. Gets the number of elements in the immutable sorted set. The number of elements in the immutable sorted set. Gets a value that indicates whether this immutable sorted set is empty. if this set is empty; otherwise, . Gets the element of the immutable sorted set at the given index. The index of the element to retrieve from the sorted set. The element at the given index. Gets the comparer used to sort keys in the immutable sorted set. The comparer used to sort keys. Gets the maximum value in the immutable sorted set, as defined by the comparer. The maximum value in the set. Gets the minimum value in the immutable sorted set, as defined by the comparer. The minimum value in the set. Returns true, since immutable collections are always read-only. See the interface. A boolean value indicating whether the collection is read-only. See the interface. The zero-based index of the item to access. The element stored at the specified index. Returns true, since immutable collections are always thread-safe. See the interface. A boolean value indicating whether the collection is thread-safe. See . Object used for synchronizing access to the collection. Gets a value that indicates whether the has a fixed size. if the has a fixed size; otherwise, . Gets a value that indicates whether the is read-only. if the is read-only; otherwise, . Gets or sets the at the specified index. The index. The . Represents a sorted set that enables changes with little or no memory allocations, and efficiently manipulates or builds immutable sorted sets. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Adds an element to the current set and returns a value to indicate whether the element was successfully added. The element to add to the set. if the element is added to the set; if the element is already in the set. Removes all elements from this set. Determines whether the set contains the specified object. The object to locate in the set. if is found in the set; otherwise, . Removes the specified set of items from the current set. The collection of items to remove from the set. Returns an enumerator that iterates through the set. A enumerator that can be used to iterate through the set. Searches for the first index within this set that the specified value is contained. The value to locate within the set. The index of the specified in the sorted set, if is found. If is not found and is less than one or more elements in this set, returns a negative number that is the bitwise complement of the index of the first element that's larger than . If is not found and is greater than any of the elements in the set, returns a negative number that is the bitwise complement of (the index of the last element plus 1). Modifies the current set so that it contains only elements that are also in a specified collection. The collection to compare to the current set. Determines whether the current set is a proper (strict) subset of a specified collection. The collection to compare to the current set. if the current set is a proper subset of ; otherwise, . Determines whether the current set is a proper (strict) superset of a specified collection. The collection to compare to the current set. if the current set is a proper superset of ; otherwise, . Determines whether the current set is a subset of a specified collection. The collection is compare to the current set. if the current set is a subset of ; otherwise, . Determines whether the current set is a superset of a specified collection. The collection to compare to the current set. if the current set is a superset of ; otherwise, . Gets a read-only reference to the element of the set at the given . The 0-based index of the element in the set to return. A read-only reference to the element at the given position. Determines whether the current set overlaps with the specified collection. The collection to compare to the current set. if the current set and share at least one common element; otherwise, . Removes the first occurrence of the specified object from the set. The object to remove from the set. if was removed from the set; if was not found in the set. Returns an enumerator that iterates over the immutable sorted set in reverse order. An enumerator that iterates over the set in reverse order. Determines whether the current set and the specified collection contain the same elements. The collection to compare to the current set. if the current set is equal to ; otherwise, . Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. The collection to compare to the current set. Adds an element to the current set and returns a value to indicate whether the element was successfully added. The element to add to the set. Copies the elements of the collection to an array, starting at a particular array index. The one-dimensional array that is the destination of the elements copied from collection. The array must have zero-based indexing. The zero-based index in at which copying begins. Returns an enumerator that iterates through the collection. A enumerator that can be used to iterate through the collection. Copies the elements of the set to an array, starting at a particular array index. The one-dimensional array that is the destination of the elements copied from the set. The array must have zero-based indexing. The zero-based index in at which copying begins. Returns an enumerator that iterates through the collection. A enumerator that can be used to iterate through the collection. Creates an immutable sorted set based on the contents of this instance. An immutable set. Searches the set for a given value and returns the equal value it finds, if any. The value for which to search. The value from the set that the search found, or the original value if the search yielded no match. A value indicating whether the search was successful. Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection. The collection to compare to the current state. Gets the number of elements in the immutable sorted set. The number of elements in this set. Gets the element of the set at the given index. The 0-based index of the element in the set to return. The element at the given position. Gets or sets the object that is used to determine equality for the values in the immutable sorted set. The comparer that is used to determine equality for the values in the set. Gets the maximum value in the immutable sorted set, as defined by the comparer. The maximum value in the set. Gets the minimum value in the immutable sorted set, as defined by the comparer. The minimum value in the set. Gets a value that indicates whether this instance is read-only. Always . Gets a value that indicates whether access to the is synchronized (thread-safe). if access to the is synchronized (thread-safe); otherwise, . Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . Enumerates the contents of a binary tree. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Releases the resources used by the current instance of the class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Advances the enumerator to the next element of the immutable sorted set. NuGet package: System.Collections.Immutable (about immutable collections and how to install) if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the sorted set. Sets the enumerator to its initial position, which is before the first element in the immutable sorted set. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Gets the element at the current position of the enumerator. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The element at the current position of the enumerator. The current element. The element in the collection at the current position of the enumerator. Provides a set of initialization methods for instances of the class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Creates an empty immutable stack. The type of items to be stored in the immutable stack. An empty immutable stack. Creates a new immutable stack that contains the specified item. The item to prepopulate the stack with. The type of items in the immutable stack. A new immutable collection that contains the specified item. Creates a new immutable stack that contains the specified array of items. An array that contains the items to prepopulate the stack with. The type of items in the immutable stack. A new immutable stack that contains the specified items. Creates a new immutable stack that contains the specified array of items. A span that contains the items to prepopulate the stack with. The type of items in the immutable stack. A new immutable stack that contains the specified items. Creates a new immutable stack that contains the specified items. The items to add to the stack before it's immutable. The type of items in the stack. An immutable stack that contains the specified items. Removes the specified item from an immutable stack. The stack to modify. The item to remove from the stack. The type of items contained in the stack. The stack is empty. A stack; never . Represents an immutable stack. NuGet package: System.Collections.Immutable (about immutable collections and how to install) The type of element on the stack. Removes all objects from the immutable stack. An empty immutable stack. Returns an enumerator that iterates through the immutable stack. An enumerator that can be used to iterate through the stack. Returns the object at the top of the stack without removing it. The stack is empty. The object at the top of the stack. Gets a read-only reference to the element on the top of the stack. The stack is empty. A read-only reference to the element on the top of the stack. Removes the element at the top of the immutable stack and returns the stack after the removal. The stack is empty. A stack; never . Removes the specified element from the immutable stack and returns the stack after the removal. The value to remove from the stack. A stack; never . Inserts an object at the top of the immutable stack and returns the new stack. The object to push onto the stack. The new stack. Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Removes all elements from the immutable stack. The empty immutable stack. Removes the element at the top of the immutable stack and returns the new stack. The stack is empty. The new stack; never . Inserts an element at the top of the immutable stack and returns the new stack. The element to push onto the stack. The new stack. Gets an empty immutable stack. An empty immutable stack. Gets a value that indicates whether this instance of the immutable stack is empty. if this instance is empty; otherwise, . Enumerates the contents of an immutable stack without allocating any memory. NuGet package: System.Collections.Immutable (about immutable collections and how to install) Advances the enumerator to the next element of the immutable stack. if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the stack. Gets the element at the current position of the enumerator. The element at the current position of the enumerator. LINQ extension method overrides that offer greater efficiency for than the standard LINQ methods NuGet package: System.Collections.Immutable (about immutable collections and how to install) Applies a function to a sequence of elements in a cumulative way. The collection to apply the function to. A function to be invoked on each element, in a cumulative way. The type of element contained by the collection. The final value after the cumulative function has been applied to all elements. Applies a function to a sequence of elements in a cumulative way. The collection to apply the function to. The initial accumulator value. A function to be invoked on each element, in a cumulative way. The type of the accumulated value. The type of element contained by the collection. The final accumulator value. Applies a function to a sequence of elements in a cumulative way. The collection to apply the function to. The initial accumulator value. A function to be invoked on each element, in a cumulative way. A function to transform the final accumulator value into the result type. The type of the accumulated value. The type of result returned by the result selector. The type of element contained by the collection. The final accumulator value. Gets a value indicating whether all elements in this array match a given condition. The array to check for matches. The predicate. The type of element contained by the collection. if every element of the source sequence passes the test in the specified predicate; otherwise, . Returns a value indicating whether this collection contains any elements. The builder to check for matches. The type of elements in the array. if the array builder contains any elements; otherwise, . Gets a value indicating whether the array contains any elements. The array to check for elements. The type of element contained by the collection. if the array contains an elements; otherwise, . Gets a value indicating whether the array contains any elements that match a specified condition. The array to check for elements. The delegate that defines the condition to match to an element. The type of element contained by the collection. if an element matches the specified condition; otherwise, . Returns the element at a specified index in the array. The array to find an element in. The index for the element to retrieve. The type of element contained by the collection. The item at the specified index. Returns the element at a specified index in a sequence or a default value if the index is out of range. The array to find an element in. The index for the element to retrieve. The type of element contained by the collection. The item at the specified index, or the default value if the index is not found. Returns the first element in the collection. The builder to retrieve an item from. The type of items in the array. If the array is empty. The first item in the list. Returns the first element in an array. The array to get an item from. The type of element contained by the collection. If the array is empty. The first item in the array. Returns the first element in a sequence that satisfies a specified condition. The array to get an item from. The delegate that defines the conditions of the element to search for. The type of element contained by the collection. If the array is empty. The first item in the list if it meets the condition specified by . Returns the first element in the collection, or the default value if the collection is empty. The builder to retrieve an element from. The type of item in the builder. The first item in the list, if found; otherwise the default value for the item type. Returns the first element of a sequence, or a default value if the sequence contains no elements. The array to retrieve items from. The type of element contained by the collection. The first item in the list, if found; otherwise the default value for the item type. Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. The array to retrieve elements from. The delegate that defines the conditions of the element to search for. The type of element contained by the collection. The first item in the list, if found; otherwise the default value for the item type. Returns the last element in the collection. The builder to retrieve elements from. The type of item in the builder. The collection is empty. The last element in the builder. Returns the last element of the array. The array to retrieve items from. The type of element contained by the array. The collection is empty. The last element in the array. Returns the last element of a sequence that satisfies a specified condition. The array to retrieve elements from. The delegate that defines the conditions of the element to retrieve. The type of element contained by the collection. The collection is empty. The last element of the array that satisfies the condition. Returns the last element in the collection, or the default value if the collection is empty. The builder to retrieve an element from. The type of item in the builder. The last element of a sequence, or a default value if the sequence contains no elements. Returns the last element of a sequence, or a default value if the sequence contains no elements. The array to retrieve items from. The type of element contained by the collection. The last element of a sequence, or a default value if the sequence contains no elements. Returns the last element of a sequence that satisfies a condition or a default value if no such element is found. The array to retrieve an element from. The delegate that defines the conditions of the element to search for. The type of element contained by the collection. The last element of a sequence, or a default value if the sequence contains no elements. Projects each element of a sequence into a new form. The immutable array to select items from. A transform function to apply to each element. The type of element contained by the collection. The type of the result element. An whose elements are the result of invoking the transform function on each element of source. Projects each element of a sequence to an , flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein. The immutable array. A transform function to apply to each element of the input sequence. A transform function to apply to each element of the intermediate sequence. The type of the elements of . The type of the intermediate elements collected by . The type of the elements of the resulting sequence. An whose elements are the result of invoking the one-to-many transform function on each element of and then mapping each of those sequence elements and their corresponding source element to a result element. Determines whether two sequences are equal according to an equality comparer. The array to use for comparison. The items to use for comparison. The comparer to use to check for equality. The type of element in the compared array. The type of element contained by the collection. to indicate the sequences are equal; otherwise, . Determines whether two sequences are equal according to an equality comparer. The array to use for comparison. The items to use for comparison. The comparer to use to check for equality. The type of element in the compared array. The type of element contained by the collection. to indicate the sequences are equal; otherwise, . Determines whether two sequences are equal according to an equality comparer. The array to use for comparison. The items to use for comparison. The comparer to use to check for equality. The type of element in the compared array. The type of element contained by the collection. to indicate the sequences are equal; otherwise, . Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. The array to retrieve the element from. The type of element contained by the collection. The element in the sequence. Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists. The immutable array to return a single element from. The function to test whether an element should be returned. The type of element contained by the collection. Returns . 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. The array. The type of element contained by the collection. contains more than one element. The element in the array, or the default value if the array is empty. 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. The array to get the element from. The condition the element must satisfy. The type of element contained by the collection. More than one element satisfies the condition in . The element if it satisfies the specified condition; otherwise the default element. Copies the contents of this array to a mutable array. The immutable array to copy into a mutable one. The type of element contained by the collection. The newly instantiated array. Creates a dictionary based on the contents of this array. The array to create a dictionary from. The key selector. The type of the key. The type of element contained by the collection. The newly initialized dictionary. Creates a dictionary based on the contents of this array. The array to create a dictionary from. The key selector. The comparer to initialize the dictionary with. The type of the key. The type of element contained by the collection. The newly initialized dictionary. Creates a dictionary based on the contents of this array. The array to create a dictionary from. The key selector. The element selector. The type of the key. The type of the element. The type of element contained by the collection. The newly initialized dictionary. Creates a dictionary based on the contents of this array. The array to create a dictionary from. The key selector. The element selector. The comparer to initialize the dictionary with. The type of the key. The type of the element. The type of element contained by the collection. The newly initialized dictionary. Filters a sequence of values based on a predicate. The array to filter. The condition to use for filtering the array content. The type of element contained by the collection. Returns that contains elements that meet the condition. An unsafe class that provides a set of methods to access the underlying data representations of immutable collections. Gets the underlying array for an input value. The input value to get the underlying array from. The type of elements in the input value. The underlying array for , if present. Gets an value wrapping the input array. The input array to wrap in the returned value. The type of elements in the input array. An value wrapping .