Click or drag to resize
ArrayXResizeT Method (ListT, Int32, ArrayXAddItemCallbackT, ArrayXRemoveItemCallbackT)
Add or remove elements to or from list until it has size elements.

Namespace: Candlelight
Assembly: Assembly-CSharp-firstpass (in Assembly-CSharp-firstpass.dll) Version: 0.0.0.0
Syntax
C#
public static void Resize<T>(
	this List<T> list,
	int size,
	ArrayXAddItemCallback<T> onAdd,
	ArrayXRemoveItemCallback<T> onRemove
)

Parameters

list
Type: System.Collections.GenericListT
List.
size
Type: SystemInt32
Desired size.
onAdd
Type: CandlelightArrayXAddItemCallbackT
A callback to specify the item to be added at a particular index.
onRemove
Type: CandlelightArrayXRemoveItemCallbackT
A callback to do something with an item being removed at a particular index.

Type Parameters

T
The element type.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
For some reason, implementing onAdd and onRemove as optional parameters results in an exception when compiling to bytecode in Unity.
See Also