Show / Hide Table of Contents

Class TupleExtensions

Provides extension methods for tuples.

Inheritance
object
TupleExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public static class TupleExtensions

Methods

| Edit this page View Source

AsReadOnlySpan<T>(in ValueTuple)

Obtains read-only span over tuple items.

Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this in ValueTuple tuple)
Parameters
Type Name Description
() tuple

The tuple.

Returns
Type Description
ReadOnlySpan<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsReadOnlySpan<T>(ref readonly (T, T, T, T, T, T, T))

Obtains read-only span over tuple items.

Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T, T, T, T, T, T) tuple)
Parameters
Type Name Description
(T, T, T, T, T, T, T) tuple

The tuple.

Returns
Type Description
ReadOnlySpan<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsReadOnlySpan<T>(ref readonly (T, T, T, T, T, T))

Obtains read-only span over tuple items.

Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T, T, T, T, T) tuple)
Parameters
Type Name Description
(T, T, T, T, T, T) tuple

The tuple.

Returns
Type Description
ReadOnlySpan<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsReadOnlySpan<T>(ref readonly (T, T, T, T, T))

Obtains read-only span over tuple items.

Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T, T, T, T) tuple)
Parameters
Type Name Description
(T, T, T, T, T) tuple

The tuple.

Returns
Type Description
ReadOnlySpan<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsReadOnlySpan<T>(ref readonly (T, T, T, T))

Obtains read-only span over tuple items.

Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T, T, T) tuple)
Parameters
Type Name Description
(T, T, T, T) tuple

The tuple.

Returns
Type Description
ReadOnlySpan<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsReadOnlySpan<T>(ref readonly (T, T, T))

Obtains read-only span over tuple items.

Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T, T) tuple)
Parameters
Type Name Description
(T, T, T) tuple

The tuple.

Returns
Type Description
ReadOnlySpan<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsReadOnlySpan<T>(ref readonly (T, T))

Obtains read-only span over tuple items.

Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T) tuple)
Parameters
Type Name Description
(T, T) tuple

The tuple.

Returns
Type Description
ReadOnlySpan<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsReadOnlySpan<T>(ref readonly ValueTuple<T>)

Obtains read-only span over tuple items.

Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly ValueTuple<T> tuple)
Parameters
Type Name Description
ValueTuple<T> tuple

The tuple.

Returns
Type Description
ReadOnlySpan<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsSpan<T>(ref ValueTuple)

Obtains a span over tuple items.

Declaration
public static Span<T> AsSpan<T>(this ref ValueTuple tuple)
Parameters
Type Name Description
() tuple

The tuple.

Returns
Type Description
Span<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsSpan<T>(ref (T, T, T, T, T, T, T))

Obtains a span over tuple items.

Declaration
public static Span<T> AsSpan<T>(this ref (T, T, T, T, T, T, T) tuple)
Parameters
Type Name Description
(T, T, T, T, T, T, T) tuple

The tuple.

Returns
Type Description
Span<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsSpan<T>(ref (T, T, T, T, T, T))

Obtains a span over tuple items.

Declaration
public static Span<T> AsSpan<T>(this ref (T, T, T, T, T, T) tuple)
Parameters
Type Name Description
(T, T, T, T, T, T) tuple

The tuple.

Returns
Type Description
Span<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsSpan<T>(ref (T, T, T, T, T))

Obtains a span over tuple items.

Declaration
public static Span<T> AsSpan<T>(this ref (T, T, T, T, T) tuple)
Parameters
Type Name Description
(T, T, T, T, T) tuple

The tuple.

Returns
Type Description
Span<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsSpan<T>(ref (T, T, T, T))

Obtains a span over tuple items.

Declaration
public static Span<T> AsSpan<T>(this ref (T, T, T, T) tuple)
Parameters
Type Name Description
(T, T, T, T) tuple

The tuple.

Returns
Type Description
Span<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsSpan<T>(ref (T, T, T))

Obtains a span over tuple items.

Declaration
public static Span<T> AsSpan<T>(this ref (T, T, T) tuple)
Parameters
Type Name Description
(T, T, T) tuple

The tuple.

Returns
Type Description
Span<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsSpan<T>(ref (T, T))

Obtains a span over tuple items.

Declaration
public static Span<T> AsSpan<T>(this ref (T, T) tuple)
Parameters
Type Name Description
(T, T) tuple

The tuple.

Returns
Type Description
Span<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

AsSpan<T>(ref ValueTuple<T>)

Obtains a span over tuple items.

Declaration
public static Span<T> AsSpan<T>(this ref ValueTuple<T> tuple)
Parameters
Type Name Description
ValueTuple<T> tuple

The tuple.

Returns
Type Description
Span<T>

The span over items in the tuple.

Type Parameters
Name Description
T

The type of items in the tuple.

| Edit this page View Source

ToArray<T>(T)

Copies tuple items to an array.

Declaration
public static object?[] ToArray<T>(this T tuple) where T : ITuple
Parameters
Type Name Description
T tuple

The tuple instance.

Returns
Type Description
object[]

An array of tuple items.

Type Parameters
Name Description
T

The type of the tuple.

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾