Skip to content

Instantly share code, notes, and snippets.

@peterthorsteinson
Created October 25, 2019 23:39
Show Gist options
  • Save peterthorsteinson/3fbb2550f54210e6c76bbc98cb96557c to your computer and use it in GitHub Desktop.
Save peterthorsteinson/3fbb2550f54210e6c76bbc98cb96557c to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
List<Tuple<string, string>> list = new List<Tuple<string, string>>();
list.Add(new Tuple<string, string>("fruit", "apple"));
list.Add(new Tuple<string, string>("fruit", "peach"));
list.Add(new Tuple<string, string>("vegetable", "carrot"));
list.Add(new Tuple<string, string>("vegetable", "broccoli"));
foreach (var item in list)
{
Console.WriteLine("category: " + item.Item1 + ", example: " + item.Item2);
}
}
}
@peterthorsteinson
Copy link
Author

Tuples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment