I wanted to add a KeyValuePair<T,U>
to a Dictionary<T, U>
and I couldn't. I have to pass the key and the value separately, which must mean the Add method has to create a new KeyValuePair object to insert, which can't be very efficient. I can't believe there isn't an Add(KeyValuePair<T, U>)
overload on the Add method. Can anyone suggest a possible reason for this apparent oversight?