Export (0) Print
Expand All

ImmutableStack(Of T) Class

Represents an immutable stack.

NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)

System.Object
  System.Collections.Immutable.ImmutableStack(Of T)

Namespace:  System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

'Declaration
Public NotInheritable Class ImmutableStack(Of T) _
	Implements IImmutableStack(Of T), IEnumerable(Of T),  _
	IEnumerable

Type Parameters

T

The type of element on the stack.

The ImmutableStack(Of T) type exposes the following members.

  NameDescription
Public propertyStatic memberEmptyGets an empty immutable stack.
Public propertyIsEmptyGets a value that indicates whether this instance of the immutable stack is empty.
Top

  NameDescription
Public methodClearRemoves all objects from the immutable stack.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator that iterates through the immutable stack.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodPeekReturns the object at the top of the stack without removing it.
Public methodPopRemoves the element at the top of the immutable stack and returns the stack after the removal.
Public methodPop(T)Removes the specified element from the immutable stack and returns the stack after the removal.
Public methodPushInserts an object at the top of the immutable stack and returns the new stack.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public Extension MethodPop(Of T)Removes the specified item from an immutable stack. (Defined by ImmutableStack.)
Public Extension MethodToImmutableArray(Of T) [This topic is preliminary and is subject to change.]
Creates an immutable array from the specified collection.
(Defined by ImmutableArray.)
Public Extension MethodToImmutableDictionary(Of T, TKey)(Func(Of T, TKey))Overloaded. Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys. (Defined by ImmutableDictionary.)
Public Extension MethodToImmutableDictionary(Of T, TKey)(Func(Of T, TKey), IEqualityComparer(Of TKey))Overloaded. Constructs an immutable dictionary based on some transformation of a sequence. (Defined by ImmutableDictionary.)
Public Extension MethodToImmutableDictionary(Of T, TKey, TValue)(Func(Of T, TKey), Func(Of T, TValue))Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents. (Defined by ImmutableDictionary.)
Public Extension MethodToImmutableDictionary(Of T, TKey, TValue)(Func(Of T, TKey), Func(Of T, TValue), IEqualityComparer(Of TKey))Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer. (Defined by ImmutableDictionary.)
Public Extension MethodToImmutableDictionary(Of T, TKey, TValue)(Func(Of T, TKey), Func(Of T, TValue), IEqualityComparer(Of TKey), IEqualityComparer(Of TValue))Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers. (Defined by ImmutableDictionary.)
Public Extension MethodToImmutableHashSet(Of T)Overloaded. Enumerates a sequence and produces an immutable hash set of its contents. (Defined by ImmutableHashSet.)
Public Extension MethodToImmutableHashSet(Of T)(IEqualityComparer(Of T))Overloaded. Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type. (Defined by ImmutableHashSet.)
Public Extension MethodToImmutableList(Of T)Enumerates a sequence and produces an immutable list of its contents. (Defined by ImmutableList.)
Public Extension MethodToImmutableSortedDictionary(Of T, TKey, TValue)(Func(Of T, TKey), Func(Of T, TValue))Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents. (Defined by ImmutableSortedDictionary.)
Public Extension MethodToImmutableSortedDictionary(Of T, TKey, TValue)(Func(Of T, TKey), Func(Of T, TValue), IComparer(Of TKey))Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer. (Defined by ImmutableSortedDictionary.)
Public Extension MethodToImmutableSortedDictionary(Of T, TKey, TValue)(Func(Of T, TKey), Func(Of T, TValue), IComparer(Of TKey), IEqualityComparer(Of TValue))Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers. (Defined by ImmutableSortedDictionary.)
Public Extension MethodToImmutableSortedSet(Of T)Overloaded. Enumerates a sequence and produces an immutable sorted set of its contents. (Defined by ImmutableSortedSet.)
Public Extension MethodToImmutableSortedSet(Of T)(IComparer(Of T))Overloaded. Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer. (Defined by ImmutableSortedSet.)
Top

  NameDescription
Explicit interface implemetationPrivate methodIEnumerable(Of T).GetEnumeratorReturns an enumerator that iterates through the collection.
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an enumerator that iterates through a collection.
Explicit interface implemetationPrivate methodIImmutableStack(Of T).ClearRemoves all elements from the immutable stack.
Explicit interface implemetationPrivate methodIImmutableStack(Of T).PopRemoves the element at the top of the immutable stack and returns the new stack.
Explicit interface implemetationPrivate methodIImmutableStack(Of T).PushInserts an element at the top of the immutable stack and returns the new stack.
Top

This type is thread safe.

Show:
© 2014 Microsoft