237 {
238 get
239 {
241 {
242 throw new ArgumentNullException("key", SR.ArgumentNull_Key);
243 }
244 for (DictionaryNode next =
head; next !=
null; next = next.
next)
245 {
246 if (next.key.Equals(
key))
247 {
248 return next.value;
249 }
250 }
251 return null;
252 }
253 set
254 {
256 {
257 throw new ArgumentNullException("key", SR.ArgumentNull_Key);
258 }
260 DictionaryNode dictionaryNode = null;
261 DictionaryNode next =
head;
262 while (next !=
null && !next.key.Equals(
key))
263 {
264 dictionaryNode = next;
266 }
267 if (next != null)
268 {
270 return;
271 }
272 DictionaryNode dictionaryNode2 = new DictionaryNode();
273 dictionaryNode2.key =
key;
274 dictionaryNode2.value =
value;
275 if (dictionaryNode != null)
276 {
277 dictionaryNode.next = dictionaryNode2;
278 }
279 else
280 {
281 head = dictionaryNode2;
282 }
284 }
285 }