Created
August 24, 2012 07:09
-
-
Save track8/3446989 to your computer and use it in GitHub Desktop.
C# hash
This file contains 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; | |
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