共用方式為


DictionaryExtensions Class

Definition

Caution

Not recommended for external use.

Extension methods for IDictionary<TKey,TValue> class.

[System.Obsolete("Not recommended for external use.")]
public static class DictionaryExtensions
[<System.Obsolete("Not recommended for external use.")>]
type DictionaryExtensions = class
Public Module DictionaryExtensions
Inheritance
DictionaryExtensions
Attributes

Methods

GetOrAddNonNull<TKey,TValue>(ConcurrentDictionary<TKey,TValue>, TKey, Func<TKey,TValue>)

Gets or adds the value associated with specified key.

GetValueOrAdd<TKey,TValue>(IDictionary<TKey,TValue>, TKey, Func<TKey,TValue>)

Gets or adds the value associated with specified key.

GetValueOrDefault<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

Gets the value associated with specified key.

TryRemove<TKey,TValue>(Dictionary<TKey,TValue>, TKey, TValue)

Removes the value associated with specified key.

Applies to