Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<Tuple<string, string, int>> SetNumAttrb(Dictionary<string, string[]> dic)
- {
- List<Tuple<string, string, int>> attNumNom = new List<Tuple<string, string, int>>();
- int ctrl = 1;
- foreach (KeyValuePair<string, string[]> kvp in dic)
- {
- for (int i = 0; i < kvp.Value.Length; i++)
- {
- attNumNom.Add(Tuple.Create<string, string, int>(kvp.Key, dic[kvp.Key][i], ctrl));
- ctrl++;
- }
- }
- return attNumNom;
- }
- List<Tuple<string, string, int>> list = SetNumAttrb(dict);
- foreach (var tuple in list)
- {
- Console.WriteLine("{0} - {1} - {2}", tuple.Item1, tuple.Item2, tuple.Item3.ToString());
- }
- Console.WriteLine(string.Join("rn", attNumNom));
Add Comment
Please, Sign In to add comment