CSharp examples for System:Tuple
To Tuple
using System.Linq; using System.Text; using System.Globalization; using System.ComponentModel; using System.Collections.Generic; using System.Collections; public class Main{ public static List<Tuple<TKey, TValue>> ToTuple<TKey, TValue>(this Dictionary<TKey, TValue> me) {/*from www. j a v a 2s.c om*/ var res = new List<Tuple<TKey, TValue>>(); foreach (var val in me) { res.Add(Tuple.Create(val.Key, val.Value)); } return res; } }