Table of Contents

Method SetCount

Namespace
Alternet.Base.Collections
Assembly
Alternet.UI.Common.dll

SetCount(int, Func<T>)

Changes the number of elements in the collection.

public void SetCount(int newCount, Func<T> createItem)

Parameters

newCount int

New number of elements.

createItem Func<T>

Function which creates new item.

Remarks

If collection has more items than specified in newCount, these items are removed. If collection has less items, new items are created using createItem function.