Show / Hide Table of Contents

Class Array<T>

Contiguous fixed-sized data structure.

Inheritance
System.Object
Array<T>
Implements
IArray<T>
IArray<T, System.Int32>
IDataStructure<T>
ISteppable<T>
System.Collections.Generic.IEnumerable<T>
ICloneable<Array<T>>
Namespace: Towel.DataStructures
Assembly: Towel.dll
Syntax
public class Array<T> : object, IArray<T>, IArray<T, int>, IDataStructure<T>, ISteppable<T>, System.Collections.Generic.IEnumerable<T>, ICloneable<Array<T>>
Type Parameters
Name Description
T

The generic type within the structure.

Constructors

| Improve this Doc View Source

Array(T[])

Constructs by wrapping an existing array.

Declaration
public Array(params T[] array)
Parameters
Type Name Description
T[] array

The array to be wrapped.

| Improve this Doc View Source

Array(Int32)

Constructs an array that implements a traversal delegate function which is an optimized "foreach" implementation.

Declaration
public Array(int size)
Parameters
Type Name Description
System.Int32 size

The length of the array in memory.

Properties

| Improve this Doc View Source

Item[Int32]

Allows indexed access of the array.

Declaration
public T this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
T

The value at the desired index.

| Improve this Doc View Source

Length

The length of the array.

Declaration
public int Length { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

Clone()

Clones a T.

Declaration
public Array<T> Clone()
Returns
Type Description
Array<T>

A clone of the T.

| Improve this Doc View Source

GetEnumerator()

Declaration
public System.Collections.Generic.IEnumerator<T> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<T>
| Improve this Doc View Source

StepperBreak<TStep>(TStep)

Traverses values and invokes a function on every T value.

Declaration
public StepStatus StepperBreak<TStep>(TStep step)
    where TStep : struct, IFunc<T, StepStatus>
Parameters
Type Name Description
TStep step

The function to invoke on every T value.

Returns
Type Description
StepStatus

The status of the traversal.

Type Parameters
Name Description
TStep

The type of function to invoke on every T value.

| Improve this Doc View Source

ToArray()

Constructs an array with the values of this data structure.

Declaration
public T[] ToArray()
Returns
Type Description
T[]

An array with the values of this data structure.

Operators

| Improve this Doc View Source

Implicit(T[] to Array<T>)

Implicitly converts a C# System array into a Towel array.

Declaration
public static implicit operator Array<T>(T[] array)
Parameters
Type Name Description
T[] array

The array to be represented as a Towel array.

Returns
Type Description
Array<T>
| Improve this Doc View Source

Implicit(Array<T> to T[])

Implicitly converts a Towel array into a C# System array.

Declaration
public static implicit operator T[](Array<T> array)
Parameters
Type Name Description
Array<T> array

The array to be represented as a C# System array.

Returns
Type Description
T[]

Implements

IArray<T>
IArray<T, TIndex>
IDataStructure<T>
ISteppable<T>
System.Collections.Generic.IEnumerable<>
ICloneable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX