public Dictionary<string, string> GetSectionValues(string sectionName)
{
List<KeyValuePair<string, string>> keyValuePairs;
Dictionary<string, string> retval;
keyValuePairs = GetSectionValuesAsList(sectionName);
//Convert list into a dictionary.
retval = new Dictionary<string, string>(keyValuePairs.Count);
foreach (KeyValuePair<string, string> keyValuePair in keyValuePairs)
{
//Skip any key we have already seen.
if (!retval.ContainsKey(keyValuePair.Key))
{
retval.Add(keyValuePair.Key, keyValuePair.Value);
}
}
return retval;
}