> Dictionary는 기본적으로 키 값이 고유해야 합니다.

C#의 Dictionary는 기본적으로 키 값이 고유해야 하며, 동일한 키를 추가하려고 하면 ArgumentException이 발생합니다. 
키 중복이 발생할 수 있는 시나리오에서 이를 처리하는 방법은 상황에 따라 다릅니다. 
몇 가지 일반적인 해결 방법은 다음과 같습니다:

1. Dictionary의 값에 중복 키 데이터를 저장하기
키 중복을 허용해야 한다면, 값을 컬렉션(예: List 또는 HashSet)으로 변경하여 하나의 키에 여러 값을 저장할 수 있습니다.

2. Lookup 사용
System.Linq의 Lookup 클래스는 중복 키를 자연스럽게 처리할 수 있는 기능을 제공합니다.

3. 커스텀 자료구조로 구현
Dictionary 대신 키 중복을 처리하기 위한 커스텀 자료구조를 사용할 수도 있습니다.

4. 키를 고유하게 변경
중복 키를 허용하지 않는 Dictionary를 사용해야 하는 경우, 키를 고유하게 만들 방법을 고안할 수 있습니다. 
예를 들어, 키에 고유 식별자를 추가하거나 조합하는 방식입니다.

5. 데이터 설계를 검토
만약 중복 키가 자주 발생한다면 데이터 설계의 문제일 수 있습니다. 
데이터를 재구조화하거나 다른 컬렉션 타입(예: List, IGrouping)을 사용하는 것이 더 적합할 수 있습니다.

결론
위 방법들 중 선택은 사용 사례에 따라 다릅니다:

키에 여러 값을 저장해야 한다면 **List를 값으로 사용하거나 Lookup**을 사용하세요.
키를 고유하게 유지하려면 고유 식별자를 추가하세요.
대량의 중복 처리가 빈번하다면 데이터 설계를 다시 고려해보는 것이 좋습니다.

(keys):[아스플로, KR7159010008, 159010, KSQ+KR7159010008]
(RegisterMultiKeyDictionary):[01037/아스플로                                /KR7159010008/159010  ]
(keys):[제로투세븐, KR7159580000, 159580, KSQ+KR7159580000]
(RegisterMultiKeyDictionary):[01038/제로투세븐                              /KR7159580000/159580  ]
(keys):[스킨앤스킨, KR7159910009, 159910, KSQ+KR7159910009]
(RegisterMultiKeyDictionary):[01039/스킨앤스킨                              /KR7159910009/159910  ]
(keys):[NEW, KR7160550000, 160550, KSQ+KR7160550000]
(RegisterMultiKeyDictionary):[01040/NEW                                     /KR7160550000/160550  ]
(keys):[이큐셀, KR7160600003, 160600, KSQ+KR7160600003]
(RegisterMultiKeyDictionary):[01041/이큐셀                                  /KR7160600003/160600  ]
(keys):[싸이맥스, KR7160980009, 160980, KSQ+KR7160980009]
(RegisterMultiKeyDictionary):[01042/싸이맥스                                /KR7160980009/160980  ]
(keys):[THE MIDONG, KR7161570007, 161570, KSQ+KR7161570007]
(RegisterMultiKeyDictionary):[01043/THE MIDONG                              /KR7161570007/161570  ]
(keys):[필옵틱스, KR7161580006, 161580, KSQ+KR7161580006]
(RegisterMultiKeyDictionary):[01044/필옵틱스                                /KR7161580006/161580  ]
(keys):[신스틸, KR7162300008, 162300, KSQ+KR7162300008]
(RegisterMultiKeyDictionary):[01045/신스틸                                  /KR7162300008/162300  ]
(keys):[핑거, KR7163730005, 163730, KSQ+KR7163730005]
(RegisterMultiKeyDictionary):[01046/핑거                                    /KR7163730005/163730  ]
(keys):[이루다, KR7164060006, 164060, KSQ+KR7164060006]
(RegisterMultiKeyDictionary):[01047/이루다                                  /KR7164060006/164060  ]
(keys):[하나머티리얼즈, KR7166090001, 166090, KSQ+KR7166090001]
(RegisterMultiKeyDictionary):[01048/하나머티리얼즈                          /KR7166090001/166090  ]
(keys):[코아스템켐온, KR7166480004, 166480, KSQ+KR7166480004]
(RegisterMultiKeyDictionary):[01049/코아스템켐온                            /KR7166480004/166480  ]

+ Recent posts