私はC#4.0を使用しています。IDictionary を使用して (string,string) ペアを格納したい。以下のように:
Dictionary<string, string> _tempDicData = new Dictionary<string, string>();
_tempDicData.Add("Hello", "xyz");
_tempDicData.Add("Hello", "aaa");
_tempDicData.Add("Hello", "qwert");
_tempDicData.Add("Hello", "foo");
_tempDicData.Add("Hello", "pqr");
_tempDicData.Add("Hello", "abc");
しかし、エラーが発生しました:
An item with the same key has already been added.
では、どうすれば同じキーを IDictionary に保存できますか?