Version 2.1.0.0

ListExtensions class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public static class ListExtensions
Various list extension methods.
Inheritance
  • System.Object
  • ListExtensions

Methods

SetLength<T>(IList<T>, Int32)
Increases or decrease the number of items in the list to the specified count.
public static void SetLength<T>(this IList<T> list, int length)
Parameters
System.Collections.Generic.IList<T> list

The list.

System.Int32 length

The new length.

Type Parameters
T

SetLength<T>(IList<T>, Int32, Func<T>)
Increases or decrease the number of items in the list to the specified count.
public static void SetLength<T>(this IList<T> list, int length, Func<T> newElement)
Parameters
System.Collections.Generic.IList<T> list

The list.

System.Int32 length

The new length.

System.Func<T> newElement

Value of new elements.

Type Parameters
T

SetLength<T>(ref IList<T>, Int32)
Increases or decrease the number of items in the list to the specified count.
public static void SetLength<T>(ref IList<T> list, int length)
Parameters
System.Collections.Generic.IList<T> list

The list.

System.Int32 length

The new length.

Type Parameters
T

SetLength<T>(ref IList<T>, Int32, Func<T>)
Increases or decrease the number of items in the list to the specified count.
public static void SetLength<T>(ref IList<T> list, int length, Func<T> newElement)
Parameters
System.Collections.Generic.IList<T> list

The list.

System.Int32 length

The new length.

System.Func<T> newElement

Value of new elements.

Type Parameters
T

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.