[나크21] 캐주얼 미니스커트 치마바지 NK21-P-10
BLOG main image
분류 전체보기 (540)
▩▩ 개인공간 ▩▩ (124)
▩▩ 문화생활 ▩▩ (45)
▩▩ 게임 ▩▩ (211)
▩▩ 일러스트 ▩▩ (46)
▩▩ 프로그래밍 ▩▩ (73)
▩▩ 코스메틱 ▩▩ (1)
▩▩ 여행 ▩▩ (0)
* 셈틀 롤드컵 * (1)
반응형
Total
Today hit
Yesterday hit
▩▩ 프로그래밍 ▩▩/C#
반응형

Dictionary<string,int> dic = new Dictionary<string, int>();
dic.Add("key1", 1);
dic.Add("key2", 2);
dic.Add("key3", 3);

foreach(KeyValuePair<string, int> kv in dic)
{
Console.WriteLine("Key: {0}, Value: {1}", kv.Key, kv.Value);
}


아이가릿
저 자리에 Dictionary<string,int> 이딴거 안되고 KeyValuePair 이것만 댐
매우 간단하지만 모르면 짲응나는 것

출처 : http://kuros-textcube.blogspot.kr/2009/03/dictionary-foreach-%EB%A3%A8%ED%94%84-%EB%8F%8C%EB%A6%AC%EA%B8%B0.html
반응형