I'm not a very confident programmer yet, but I get there.
My problem is that I have
static Dictionary<string, Dictionary<string, List<string>>> testDictionary = ...
If the dictionary does not contain the current key (string), I can easily add the key and another filled dictionary, for example ...
testDictionary.Add(userAgentResult, allowDisallowDictionary);
This works fine, my problem occurs when I try to add an internal dictionary if the userAgentResult key already exists.
I was hoping to do it this way ...
testDictionary[userAgentResult].Add(allowDisallowDictionary);
but the .Add method wants two arguments, that is, a row key and a list value. So, I continued to write this code ...
List<string> testDictionaryList = new List<string>();
testDictionaryList.Add(regexForm(allowResult, url));
testDictionary[userAgentResult].Add(allowDisallowKey, testDictionaryList);
This also works, my problem is that this dictionary is added many times, and when the internal dictionary already contains the key that it is trying to add, this is obviously an error. So when