DictionaryExtensionsInvertTKey, TValue Method |
With throw exception if not 1-1 mapping.
Namespace: Bio.UtilAssembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax public static Dictionary<TValue, TKey> Invert<TKey, TValue>(
this IDictionary<TKey, TValue> dict
)
<ExtensionAttribute>
Public Shared Function Invert(Of TKey, TValue) (
dict As IDictionary(Of TKey, TValue)
) As Dictionary(Of TValue, TKey)
public:
[ExtensionAttribute]
generic<typename TKey, typename TValue>
static Dictionary<TValue, TKey>^ Invert(
IDictionary<TKey, TValue>^ dict
)
[<ExtensionAttribute>]
static member Invert :
dict : IDictionary<'TKey, 'TValue> -> Dictionary<'TValue, 'TKey>
Parameters
- dict
- Type: System.Collections.GenericIDictionaryTKey, TValue
[Missing <param name="dict"/> documentation for "M:Bio.Util.DictionaryExtensions.Invert``2(System.Collections.Generic.IDictionary{``0,``1})"]
Type Parameters
- TKey
[Missing <typeparam name="TKey"/> documentation for "M:Bio.Util.DictionaryExtensions.Invert``2(System.Collections.Generic.IDictionary{``0,``1})"]
- TValue
[Missing <typeparam name="TValue"/> documentation for "M:Bio.Util.DictionaryExtensions.Invert``2(System.Collections.Generic.IDictionary{``0,``1})"]
Return Value
Type:
DictionaryTValue,
TKey[Missing <returns> documentation for "M:Bio.Util.DictionaryExtensions.Invert``2(System.Collections.Generic.IDictionary{``0,``1})"]
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IDictionaryTKey,
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