PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Collections Namespace / Extensions Class / Extensions Methods / Extensions.​To­Advisable­Dictionary Method / Extensions.​To­Advisable­Dictionary(TKey, TValue) Method (IDictionary(TKey, TValue))

Extensions.ToAdvisableDictionary<TKey, TValue> Method (IDictionary<TKey, TValue>)

Namespace:  PostSharp.Patterns.Collections
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
public static AdvisableDictionary<TKey, TValue> ToAdvisableDictionary<TKey, TValue>(
	this IDictionary<TKey, TValue> dictionary


Type: System.Collections.Generic.IDictionary<TKey, TValue>
An IDictionary<TKey, TValue>, or null.

Type Parameters

Type of dictionary keys.
Type of dictionary values.

Return Value

Type: AdvisableDictionary<TKey, TValue>
A new AdvisableDictionary<TKey, TValue> containing all elements of dictionary, or null if dictionary is empty.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDictionary<TKey, TValue>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also