public object this[int index]
{
get
{
return ((DictionaryEntry)objectsArray[index]).Value;
}
set
{
if (_readOnly)
{
throw new NotSupportedException(SR.OrderedDictionary_ReadOnly);
}
if (index < 0 || index >= objectsArray.Count)
{
throw new ArgumentOutOfRangeException(nameof(index));
}
object key = ((DictionaryEntry)objectsArray[index]).Key;
objectsArray[index] = new DictionaryEntry(key, value);
objectsTable[key] = value;
}
}