EnumerableBaseWrapperT, TBase Class

Wrapping of an IEnumerableT of T to an IEnumerableT of TBase, under the assumption that T extends TBase.

This will make the enumerable available as having base class elements, without copying the content of the enumerable.

Definition

Namespace: DHI.Mike1D.Generic.Collections
Assembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class EnumerableBaseWrapper<T, TBase> : IEnumerable<TBase>, 
	IEnumerable
where T : TBase
Inheritance
Object    EnumerableBaseWrapperT, TBase
Implements
IEnumerableTBase, IEnumerable

Type Parameters

T
Type extending TBase
TBase
Base type

Remarks

This is required since an IEnumerableT does not extend an IEnumerableT even though T extends TBase

Constructors

EnumerableBaseWrapperT, TBase Create a new wrapper object that wraps the provided enumerable

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetEnumerator Returns an enumerator of TBase that iterates through the collection.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also