Beispiel #1
0
        public void CustomIndexerName()
        {
            dynamic d      = new AllTheIntegers();
            int     answer = d[42];

            Assert.Equal(42, answer);
        }
Beispiel #2
0
        public void CustomIndexerNameDynamicArgument()
        {
            AllTheIntegers all    = new AllTheIntegers();
            dynamic        d      = 3;
            int            answer = all[d];

            Assert.Equal(3, answer);
        }