ReadOnlyCollectionBuilder<T> 构造函数

定义

重载

ReadOnlyCollectionBuilder<T>()

构造一个 ReadOnlyCollectionBuilder<T>Constructs a ReadOnlyCollectionBuilder<T>.

ReadOnlyCollectionBuilder<T>(IEnumerable<T>)

构造 ReadOnlyCollectionBuilder<T>,并复制给定集合的内容。Constructs a ReadOnlyCollectionBuilder<T>, copying the contents of the given collection.

ReadOnlyCollectionBuilder<T>(Int32)

构造具有给定初始容量的 ReadOnlyCollectionBuilder<T>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>()

public:
 ReadOnlyCollectionBuilder();
public ReadOnlyCollectionBuilder ();
Public Sub New ()

ReadOnlyCollectionBuilder<T>(IEnumerable<T>)

构造 ReadOnlyCollectionBuilder<T>,并复制给定集合的内容。Constructs a ReadOnlyCollectionBuilder<T>, copying the contents of the given collection.

public:
 ReadOnlyCollectionBuilder(System::Collections::Generic::IEnumerable<T> ^ collection);
public ReadOnlyCollectionBuilder (System.Collections.Generic.IEnumerable<T> collection);
new System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<'T> : seq<'T> -> System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<'T>
Public Sub New (collection As IEnumerable(Of T))

参数

collection
IEnumerable<T>

从其中复制元素的集合。Collection to copy elements from.

ReadOnlyCollectionBuilder<T>(Int32)

构造具有给定初始容量的 ReadOnlyCollectionBuilder<T>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.

public:
 ReadOnlyCollectionBuilder(int capacity);
public ReadOnlyCollectionBuilder (int capacity);
new System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<'T> : int -> System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<'T>
Public Sub New (capacity As Integer)

参数

capacity
Int32

初始容量。Initial capacity.

适用于