Property and Method

Count 딕셔너리에 저장된 키-값의 쌍의 개수
Keys 키(Key)에 접근
Values 값(Values)에 접근
Add(Key, Value) 딕셔너리에 키에 해당하는 값을 저장
Remove(Key) 키와 값을 사전에서 제거합니다.
Clear() 딕셔너리의 모든 요소를 제거
ContainsKey(Key) 키(Key)가 해당 딕셔너리에 있는지를 확인합니다.

‘System.Collections.Generic’

using System.Collections.Generic

Dictionary Declaration

Dictionary<string, int> dict = new Dictionary<string, int>();

Dictionary.Add(Key, Value)

dict.Add("apple", 1000);

Dictionary[Key]