using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
public static void Main()
var test = new SortedList<int,int>();
var test2 = new Dictionary<int,int>();
foreach(var num in Enumerable.Range(0,10000))
var sw = new Stopwatch();
for(var i=0; i < test.Count; i++)
var output = (test.Values as IList<int>)[i];
var sw2 = new Stopwatch();
for(var i=0; i < test.Count; i++)
var output = test2.ElementAt(i).Value;
Console.WriteLine("SortedList : " + sw.Elapsed.TotalSeconds);
Console.WriteLine("Dict : " + sw2.Elapsed.TotalSeconds);