Header menu logo ResizeArray

AutoOpenResizeArrayExtensions Module

Extension methods for ResizeArray<'T>. This module is automatically opened when the namespace ResizeArray is opened.

Type extensions

Type extension Description

this.AsString

Full Usage: this.AsString

Parameters:
    () : unit

Returns: string

A string representation of the ResizeArray including the count of entries and the first 5 entries. When used in Fable this member is inlined for reflection to work.

Extended Type: List

() : unit
Returns: string

this.AsString

Full Usage: this.AsString

Returns: string

A string representation of the ResizeArray including the count of entries and the first 5 entries. When used in Fable this member is inlined for reflection to work.

Extended Type: List

Returns: string

this.Clone

Full Usage: this.Clone

Parameters:
    () : unit

Returns: List<'T>
Modifiers: inline

Creates a shallow copy of the list (for a ResizeArray of structs this is like a deep copy)

Extended Type: List

() : unit
Returns: List<'T>

this.Duplicate

Full Usage: this.Duplicate

Parameters:
    () : unit

Returns: ResizeArray<'T>

Creates a new ResizeArray with the same items as the input ResizeArray. Shallow copy only.

Extended Type: List

() : unit
Returns: ResizeArray<'T>

this.FailIfEmpty

Full Usage: this.FailIfEmpty

Parameters:
    errorMessage : string

Returns: List<'T>
Modifiers: inline

Raises an Exception if the ResizeArray is empty (Useful for chaining) Returns the input ResizeArray

Extended Type: List

errorMessage : string
Returns: List<'T>

this.FailIfLessThan

Full Usage: this.FailIfLessThan

Parameters:
    count : int
    errorMessage : string

Returns: List<'T>
Modifiers: inline

Raises an Exception if the ResizeArray has less then count items. (Useful for chaining) Returns the input ResizeArray

Extended Type: List

count : int
errorMessage : string
Returns: List<'T>

this.First

Full Usage: this.First

Parameters:
    () : unit

Returns: 'T
Modifiers: inline

Get (or set) the first item in the ResizeArray. Equal to this.[0]

Extended Type: List

() : unit
Returns: 'T

this.First

Full Usage: this.First

Returns: 'T
Modifiers: inline

Get (or set) the first item in the ResizeArray. Equal to this.[0]

Extended Type: List

Returns: 'T

this.First

Full Usage: this.First

Parameters:
    v : 'T

Modifiers: inline

Get (or set) the first item in the ResizeArray. Equal to this.[0]

Extended Type: List

v : 'T

this.First

Full Usage: this.First

Modifiers: inline

Get (or set) the first item in the ResizeArray. Equal to this.[0]

Extended Type: List

this.FirstAndOnly

Full Usage: this.FirstAndOnly

Parameters:
    () : unit

Returns: 'T
Modifiers: inline

Gets the the only item in the ResizeArray. Fails if the ResizeArray does not have exactly one element.

Extended Type: List

() : unit
Returns: 'T

this.FirstAndOnly

Full Usage: this.FirstAndOnly

Returns: 'T
Modifiers: inline

Gets the the only item in the ResizeArray. Fails if the ResizeArray does not have exactly one element.

Extended Type: List

Returns: 'T

this.Get

Full Usage: this.Get

Parameters:
    index : int

Returns: 'T
Modifiers: inline

Gets an item at index, same as this.[index] or this.Idx(index) Throws a descriptive Exception if the index is out of range. (Use this.GetNeg(i) member if you want to use negative indices too)

Extended Type: List

index : int
Returns: 'T

this.GetLooped

Full Usage: this.GetLooped

Parameters:
    index : int

Returns: 'T
Modifiers: inline

Any index will return a value. ResizeArray is treated as an endless loop in positive and negative direction

Extended Type: List

index : int
Returns: 'T

this.GetNeg

Full Usage: this.GetNeg

Parameters:
    index : int

Returns: 'T
Modifiers: inline

Gets an item in the ResizeArray by index. Allows for negative index too ( -1 is last item, like Python) (From the release of F# 5 on a negative index can also be done with '^' prefix. E.g. ^0 for the last item)

Extended Type: List

index : int
Returns: 'T

this.GetReverseIndex

Full Usage: this.GetReverseIndex

Parameters:
    arg0 : 'a
    offset : int - The offset from the end.

Returns: int The corresponding index from the start.

Get the index for the element offset elements away from the end of the collection. This member exists to support F# indexing from back: ^0 is last item, ^1 is second last

Extended Type: List

arg0 : 'a
offset : int

The offset from the end.

Returns: int

The corresponding index from the start.

this.GetSlice

Full Usage: this.GetSlice

Parameters:
    startIdx : int option
    endIdx : int option

Returns: ResizeArray<'T>

This member enables F# slicing notation operator. e.g: xs.[1..3]. The resulting ResizeArray includes the end index. Raises an ArgumentException if indices are out of range. For indexing from the end use the ^ prefix. e.g. ^0 for the last item.

Extended Type: List

startIdx : int option
endIdx : int option
Returns: ResizeArray<'T>

this.HasItems

Full Usage: this.HasItems

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if this.Count > 0 Same as xs.IsNotEmpty

Extended Type: List

() : unit
Returns: bool

this.HasItems

Full Usage: this.HasItems

Returns: bool
Modifiers: inline

Checks if this.Count > 0 Same as xs.IsNotEmpty

Extended Type: List

Returns: bool

this.Idx

Full Usage: this.Idx

Parameters:
    index : int

Returns: 'T
Modifiers: inline

Gets an item at index, same as this.[index] or this.Get(index) Throws a descriptive Exception if the index is out of range. (Use this.GetNeg(i) member if you want to use negative indices too)

Extended Type: List

index : int
Returns: 'T

this.InsertAtStart

Full Usage: this.InsertAtStart

Parameters:
    x : 'T

Modifiers: inline

Insert an item at the beginning of the list = index 0, (moving all other items up by one index)

Extended Type: List

x : 'T

this.IsEmpty

Full Usage: this.IsEmpty

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if this.Count = 0

Extended Type: List

() : unit
Returns: bool

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool
Modifiers: inline

Checks if this.Count = 0

Extended Type: List

Returns: bool

this.IsEqualTo

Full Usage: this.IsEqualTo

Parameters:
    other : ResizeArray<'T>

Returns: bool

Shallow Structural equality comparison. Compares each element in both lists for equality. However nested ResizeArrays inside a ResizeArray are only compared for referential equality in .NET. When used in Fable (JavaScript) the nested ResizeArrays are compared for structural equality as per the Fable implementation of Javascript Arrays. (Like the default behavior of Collections.Generic.List) Raises ArgumentNullException if either list is null.

Extended Type: List

other : ResizeArray<'T>
Returns: bool

this.IsNotEmpty

Full Usage: this.IsNotEmpty

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if this.Count > 0 Same as xs.HasItems

Extended Type: List

() : unit
Returns: bool

this.IsNotEmpty

Full Usage: this.IsNotEmpty

Returns: bool
Modifiers: inline

Checks if this.Count > 0 Same as xs.HasItems

Extended Type: List

Returns: bool

this.IsSingleton

Full Usage: this.IsSingleton

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if this.Count = 1

Extended Type: List

() : unit
Returns: bool

this.IsSingleton

Full Usage: this.IsSingleton

Returns: bool
Modifiers: inline

Checks if this.Count = 1

Extended Type: List

Returns: bool

this.Last

Full Usage: this.Last

Parameters:
    () : unit

Returns: 'T
Modifiers: inline

Get (or set) the last item in the ResizeArray. Equal to this.[this.Count - 1]

Extended Type: List

() : unit
Returns: 'T

this.Last

Full Usage: this.Last

Returns: 'T
Modifiers: inline

Get (or set) the last item in the ResizeArray. Equal to this.[this.Count - 1]

Extended Type: List

Returns: 'T

this.Last

Full Usage: this.Last

Parameters:
    v : 'T

Modifiers: inline

Get (or set) the last item in the ResizeArray. Equal to this.[this.Count - 1]

Extended Type: List

v : 'T

this.Last

Full Usage: this.Last

Modifiers: inline

Get (or set) the last item in the ResizeArray. Equal to this.[this.Count - 1]

Extended Type: List

this.LastIndex

Full Usage: this.LastIndex

Parameters:
    () : unit

Returns: int
Modifiers: inline

Gets the index of the last item in the ResizeArray. Equal to this.Count - 1 Returns -1 for empty ResizeArray.

Extended Type: List

() : unit
Returns: int

this.LastIndex

Full Usage: this.LastIndex

Returns: int
Modifiers: inline

Gets the index of the last item in the ResizeArray. Equal to this.Count - 1 Returns -1 for empty ResizeArray.

Extended Type: List

Returns: int

this.Pop

Full Usage: this.Pop

Parameters:
    () : unit

Returns: 'T
Modifiers: inline

Get and remove last item from ResizeArray

Extended Type: List

() : unit
Returns: 'T

this.Pop

Full Usage: this.Pop

Parameters:
    index : int

Returns: 'T
Modifiers: inline

Get and remove item at index from ResizeArray

Extended Type: List

index : int
Returns: 'T

this.Second

Full Usage: this.Second

Parameters:
    () : unit

Returns: 'T
Modifiers: inline

Get (or set) the second item in the ResizeArray. Equal to this.[1]

Extended Type: List

() : unit
Returns: 'T

this.Second

Full Usage: this.Second

Returns: 'T
Modifiers: inline

Get (or set) the second item in the ResizeArray. Equal to this.[1]

Extended Type: List

Returns: 'T

this.Second

Full Usage: this.Second

Parameters:
    v : 'T

Modifiers: inline

Get (or set) the second item in the ResizeArray. Equal to this.[1]

Extended Type: List

v : 'T

this.Second

Full Usage: this.Second

Modifiers: inline

Get (or set) the second item in the ResizeArray. Equal to this.[1]

Extended Type: List

this.SecondLast

Full Usage: this.SecondLast

Parameters:
    () : unit

Returns: 'T
Modifiers: inline

Get (or set) the second last item in the ResizeArray. Equal to this.[this.Count - 2]

Extended Type: List

() : unit
Returns: 'T

this.SecondLast

Full Usage: this.SecondLast

Returns: 'T
Modifiers: inline

Get (or set) the second last item in the ResizeArray. Equal to this.[this.Count - 2]

Extended Type: List

Returns: 'T

this.SecondLast

Full Usage: this.SecondLast

Parameters:
    v : 'T

Modifiers: inline

Get (or set) the second last item in the ResizeArray. Equal to this.[this.Count - 2]

Extended Type: List

v : 'T

this.SecondLast

Full Usage: this.SecondLast

Modifiers: inline

Get (or set) the second last item in the ResizeArray. Equal to this.[this.Count - 2]

Extended Type: List

this.Set

Full Usage: this.Set

Parameters:
    index : int
    value : 'T

Modifiers: inline

Sets an item at index (Use this.SetNeg(i) member if you want to use negative indices too)

Extended Type: List

index : int
value : 'T

this.SetLooped

Full Usage: this.SetLooped

Parameters:
    index : int
    value : 'T

Modifiers: inline

Any index will set a value. ResizeArray is treated as an endless loop in positive and negative direction

Extended Type: List

index : int
value : 'T

this.SetNeg

Full Usage: this.SetNeg

Parameters:
    index : int
    value : 'T

Modifiers: inline

Sets an item in the ResizeArray by index. Allows for negative index too ( -1 is last item, like Python) (from the release of F# 5 on a negative index can also be done with '^' prefix. E.g. ^0 for the last item)

Extended Type: List

index : int
value : 'T

this.SetSlice

Full Usage: this.SetSlice

Parameters:
    startIdx : int option
    endIdx : int option
    newValues : IList<'T>

This member enables F# slicing notation operator e.g.: xs.[1..3] <- ys. The the end index is included. For indexing from the end use the ^ prefix. e.g. ^0 for the last item.

Extended Type: List

startIdx : int option
endIdx : int option
newValues : IList<'T>

this.Slice

Full Usage: this.Slice

Parameters:
    startIdx : int
    endIdx : int

Returns: ResizeArray<'T>

Allows for negative indices too. ( -1 is last item, like Python) The resulting array includes the end index. Alternative: with F# slicing notation (e.g. a.[1..3]) With F# preview features enabled a negative index can also be done with '^' prefix. E.g. ^0 for the last item.

Extended Type: List

startIdx : int
endIdx : int
Returns: ResizeArray<'T>

this.Third

Full Usage: this.Third

Parameters:
    () : unit

Returns: 'T
Modifiers: inline

Get (or set) the third item in the ResizeArray. Equal to this.[2]

Extended Type: List

() : unit
Returns: 'T

this.Third

Full Usage: this.Third

Returns: 'T
Modifiers: inline

Get (or set) the third item in the ResizeArray. Equal to this.[2]

Extended Type: List

Returns: 'T

this.Third

Full Usage: this.Third

Parameters:
    v : 'T

Modifiers: inline

Get (or set) the third item in the ResizeArray. Equal to this.[2]

Extended Type: List

v : 'T

this.Third

Full Usage: this.Third

Modifiers: inline

Get (or set) the third item in the ResizeArray. Equal to this.[2]

Extended Type: List

this.ThirdLast

Full Usage: this.ThirdLast

Parameters:
    () : unit

Returns: 'T
Modifiers: inline

Get (or set) the third last item in the ResizeArray. Equal to this.[this.Count - 3]

Extended Type: List

() : unit
Returns: 'T

this.ThirdLast

Full Usage: this.ThirdLast

Returns: 'T
Modifiers: inline

Get (or set) the third last item in the ResizeArray. Equal to this.[this.Count - 3]

Extended Type: List

Returns: 'T

this.ThirdLast

Full Usage: this.ThirdLast

Parameters:
    v : 'T

Modifiers: inline

Get (or set) the third last item in the ResizeArray. Equal to this.[this.Count - 3]

Extended Type: List

v : 'T

this.ThirdLast

Full Usage: this.ThirdLast

Modifiers: inline

Get (or set) the third last item in the ResizeArray. Equal to this.[this.Count - 3]

Extended Type: List

this.ToString

Full Usage: this.ToString

Parameters:
    entriesToPrint : int

Returns: string

A string representation of the ResizeArray including the count of entries and the specified amount of entries. When used in Fable this member is inlined for reflection to work.

Extended Type: List

entriesToPrint : int
Returns: string

Type something to start searching.