ImmutableArray<T>.ToBuilder 方法

定义

创建一个其内容与此数组相同,并且可使用标准可变接口在多个操作之间有效转变的不可变数组。Creates a mutable array that has the same contents as this array and can be efficiently mutated across multiple operations using standard mutable interfaces.

public:
 System::Collections::Immutable::ImmutableArray<T>::Builder ^ ToBuilder();
public System.Collections.Immutable.ImmutableArray<T>.Builder ToBuilder ();
member this.ToBuilder : unit -> System.Collections.Immutable.ImmutableArray<'T>.Builder
Public Function ToBuilder () As ImmutableArray(Of T).Builder

返回

ImmutableArray<T>.Builder

内容与此数组相同的新生成器。The new builder with the same contents as this array.

注解

这是一个 O (n) 操作,它将不可变数组的所有元素复制到生成器中。This is an O(n) operation and copies all the elements of the immutable array into the Builder. 返回的可变列表不是线程安全的。The mutable list that is returned is not thread-safe.

适用于