Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AssocArrays
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
Dictionary<string,int> assocArray = new Dictionary<string,int>();
|
||||
|
||||
assocArray["Hello"] = 1;
|
||||
assocArray.Add("World", 2);
|
||||
assocArray["!"] = 3;
|
||||
|
||||
foreach (KeyValuePair<string, int> kvp in assocArray)
|
||||
{
|
||||
Console.WriteLine(kvp.Key + " : " + kvp.Value);
|
||||
}
|
||||
|
||||
foreach (string key in assocArray.Keys)
|
||||
{
|
||||
Console.WriteLine(key);
|
||||
}
|
||||
|
||||
foreach (int val in assocArray.Values)
|
||||
{
|
||||
Console.WriteLine(val.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue