コード例 #1
0
        public void SetItem_InvalidIndex_ThrowsArgumentOutOfRangeException(int index)
        {
            var collection = new StringKeyedCollection <string>(null, 3);

            collection.GetKeyForItemHandler = item => item + "_key";
            AssertExtensions.Throws <ArgumentOutOfRangeException>("index", () => collection.SetItem(index, "first"));
        }