Skip to content

Instantly share code, notes, and snippets.

@track8
Created August 24, 2012 07:09
Show Gist options
  • Save track8/3446989 to your computer and use it in GitHub Desktop.
Save track8/3446989 to your computer and use it in GitHub Desktop.
C# hash
using System;
using System.Collections.Generic;
using System.Linq;
namespace Sample
{
class Program
{
static void Main(string[] args)
{
var hash = new Dictionary<int, string>()
{
{0, "akemi"},
{1, "homura"},
{2, "desu"}
};
hash.Keys.ToList().ForEach(k => Console.WriteLine("Key: {0}, Value: {1}", k, hash[k]));
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment