ImmutableDictionary<TKey,TValue>.ToBuilder 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立不可變的字典,其內容與這個字典相同,可使用標準可變動介面,在多個作業之間有效率地變動。
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
傳回
一個與此字典內容相同的集合,可透過標準可變介面在多個操作間有效變異。
備註
這是一個 O(1) 操作,且只會分配一個(很小的)記憶體。 回傳的可變集合並非執行緒安全。