root/lang/csharp/TypableMap/TypableMap/Program.cs @ 18271

Revision 18271, 502 bytes (checked in by mayuki, 5 years ago)

cho45さんのTypableMapをC#に移植した。

  • Property svn:keywords set to Id
Line 
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace TypableMap
6{
7    class Program
8    {
9        static void Main(string[] args)
10        {
11            TypableMap<String> map = new TypableMap<string>();
12            String id = map.Add("foo");
13            Console.WriteLine(id); // "aa"
14            Console.WriteLine(map[id]); // "foo"
15
16            for (var i = 0; i < 200; i++)
17                Console.WriteLine(map.Add(i.ToString()));
18        }
19    }
20}
Note: See TracBrowser for help on using the browser.