Created
October 25, 2019 23:39
-
-
Save peterthorsteinson/3fbb2550f54210e6c76bbc98cb96557c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | |
| } | |
| } | |
| } |
Author
peterthorsteinson
commented
Oct 25, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment