using System.Collections.Generic;
public static void Main()
KeyValuePair<string, double> kv1 = new KeyValuePair<string, double>("a", 5);
KeyValuePair<string, double> kv2 = new KeyValuePair<string, double>("b", 7);
public static class MyKeyValuePairExtensions
public static KeyValuePair<string, double> Add(
this KeyValuePair<string, double> first,
KeyValuePair<string, double> second)
return new KeyValuePair<string, double>(
first.Key + " + " + second.Key,
first.Value + second.Value);