|
Revision 18271, 502 bytes
(checked in by mayuki, 5 years ago)
|
|
cho45さんのTypableMapをC#に移植した。
|
-
Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using System.Text;
|
|---|
| 4 |
|
|---|
| 5 | namespace 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 | }
|
|---|