Struct EnumerableTuple<TItem, TTuple>
Represents tuple as enumerable collection.
Inherited Members
Namespace: DotNext
Assembly: DotNext.dll
Syntax
[Obsolete("Use Span.AsSpan(ref ValueTuple) extension methods instead")]
public struct EnumerableTuple<TItem, TTuple> : IReadOnlyList<TItem>, IReadOnlyCollection<TItem>, IEnumerable<TItem>, IEnumerable where TTuple : ITuple
Type Parameters
| Name | Description |
|---|---|
| TItem | The type of items in the tuple. |
| TTuple | The tuple type. |
Properties
| Improve this Doc View SourceCount
Gets number of items in the tuple.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Item[Int32]
Gets tuple item by its index.
Declaration
public TItem this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | index | The index of the item. |
Property Value
| Type | Description |
|---|---|
| TItem | Item value. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
|
Methods
| Improve this Doc View SourceCopyTo(Span<TItem>)
Copies tuple items into specified memory span.
Declaration
public int CopyTo(Span<TItem> output)
Parameters
| Type | Name | Description |
|---|---|---|
| Span<TItem> | output | The memory span to be written. |
Returns
| Type | Description |
|---|---|
| Int32 | The actual of modified elements in memory span. |
GetEnumerator()
Gets enumerator over items in the tuple.
Declaration
public EnumerableTuple<TItem, TTuple>.Enumerator GetEnumerator()
Returns
| Type | Description |
|---|---|
| EnumerableTuple.Enumerator<> | The enumerator over items. |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable<TItem>.GetEnumerator()
Declaration
IEnumerator<TItem> IEnumerable<TItem>.GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<TItem> |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator |