CapyKit/Documentation/Help/M_CapyKit_Pool_1__ctor_2.md

53 lines
1.3 KiB
Markdown
Raw Normal View History

# Pool<T>(Int32, Func<T>) Constructor
Initializes a new instance of the <a href="T_CapyKit_Pool_1">Pool(T)</a> class with the specified pool size and constructor selector.
## Definition
**Namespace:** <a href="N_CapyKit">CapyKit</a>
**Assembly:** CapyKit (in CapyKit.dll) Version: 1.0.0+6cdd805be49c3b769a116584ea6904955ecd820d
**C#**
``` C#
public Pool(
int poolSize,
Func<T> constructorSelector
)
```
**VB**
``` VB
Public Sub New (
poolSize As Integer,
constructorSelector As Func(Of T)
)
```
**C++**
``` C++
public:
Pool(
int poolSize,
Func<T>^ constructorSelector
)
```
**F#**
``` F#
new :
poolSize : int *
constructorSelector : Func<'T> -> Pool
```
#### Parameters
<dl><dt>  <a href="https://learn.microsoft.com/dotnet/api/system.int32" target="_blank" rel="noopener noreferrer">Int32</a></dt><dd>The size of the pool.</dd><dt>  <a href="https://learn.microsoft.com/dotnet/api/system.func-1" target="_blank" rel="noopener noreferrer">Func</a>(<a href="T_CapyKit_Pool_1">T</a>)</dt><dd>The constructor selector used to create new instances of <em>T</em>.</dd></dl>
## See Also
#### Reference
<a href="T_CapyKit_Pool_1">Pool(T) Class</a>
<a href="Overload_CapyKit_Pool_1__ctor">Pool(T) Overload</a>
<a href="N_CapyKit">CapyKit Namespace</a>