System.Collections.Tests.SortedListTests.GetByIndex C# (CSharp) Méthode

GetByIndex() private méthode

private GetByIndex ( ) : void
Résultat void
        public static void GetByIndex()
        {
            SortedList sortList1 = Helpers.CreateIntSortedList(100);
            Helpers.PerformActionOnAllSortedListWrappers(sortList1, sortList2 =>
            {
                for (int i = 0; i < sortList2.Count; i++)
                {
                    Assert.Equal(i, sortList2.GetByIndex(i));
                    int i2 = sortList2.IndexOfKey(i);
                    Assert.Equal(i, i2);

                    i2 = sortList2.IndexOfValue(i);
                    Assert.Equal(i, i2);
                }
            });
        }
SortedListTests