// Copyright (c) Umbraco.
// See LICENSE for more details.
using System.Collections.Generic;
namespace Umbraco.Extensions
{
/// <summary>
/// Provides extension methods for the <see cref="KeyValuePair{TKey,TValue}"/> struct.
/// </summary>
public static class KeyValuePairExtensions
/// Implements key/value pair deconstruction.
/// <remarks>Allows for <c>foreach ((var k, var v) in ...)</c>.</remarks>
public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> kvp, out TKey key, out TValue value)
key = kvp.Key;
value = kvp.Value;
}