ReadOnlyCollectionBuilder<T> Constructors

Definition

Overloads

ReadOnlyCollectionBuilder<T>()

Constructs a ReadOnlyCollectionBuilder<T>.

ReadOnlyCollectionBuilder<T>(IEnumerable<T>)

Constructs a ReadOnlyCollectionBuilder<T>, copying the contents of the given collection.

ReadOnlyCollectionBuilder<T>(Int32)

Constructs a ReadOnlyCollectionBuilder<T> with a given initial capacity. The contents are empty but builder will have reserved room for the given number of elements before any reallocations are required.

ReadOnlyCollectionBuilder<T>()

Source:
ReadOnlyCollectionBuilder.cs
Source:
ReadOnlyCollectionBuilder.cs
Source:
ReadOnlyCollectionBuilder.cs
C#
public ReadOnlyCollectionBuilder();

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

ReadOnlyCollectionBuilder<T>(IEnumerable<T>)

Source:
ReadOnlyCollectionBuilder.cs
Source:
ReadOnlyCollectionBuilder.cs
Source:
ReadOnlyCollectionBuilder.cs

Constructs a ReadOnlyCollectionBuilder<T>, copying the contents of the given collection.

C#
public ReadOnlyCollectionBuilder(System.Collections.Generic.IEnumerable<T> collection);

Parameters

collection
IEnumerable<T>

Collection to copy elements from.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

ReadOnlyCollectionBuilder<T>(Int32)

Source:
ReadOnlyCollectionBuilder.cs
Source:
ReadOnlyCollectionBuilder.cs
Source:
ReadOnlyCollectionBuilder.cs

Constructs a ReadOnlyCollectionBuilder<T> with a given initial capacity. The contents are empty but builder will have reserved room for the given number of elements before any reallocations are required.

C#
public ReadOnlyCollectionBuilder(int capacity);

Parameters

capacity
Int32

Initial capacity.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1