ImmutableDictionary<TKey,TValue>.ToBuilder 方法

定义

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

public:
 System::Collections::Immutable::ImmutableDictionary<TKey, TValue>::Builder ^ ToBuilder();
public System.Collections.Immutable.ImmutableDictionary<TKey,TValue>.Builder ToBuilder ();
member this.ToBuilder : unit -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>.Builder
Public Function ToBuilder () As ImmutableDictionary(Of TKey, TValue).Builder

返回

一个其内容与此字典相同,并且可使用标准可变接口在多个操作之间有效转变的集合。A collection with the same contents as this dictionary that can be efficiently mutated across multiple operations by using standard mutable interfaces.

注解

这是一项 O (1)操作,只会导致一个(小)内存分配。This is an O(1) operation and results in only a single (small) memory allocation. 返回的可变集合不是线程安全的。The mutable collection that is returned is not thread safe.

适用于