public void Deny_Unrestricted() { Assert.IsNotNull(coll.AllKeys, "AllKeys"); coll.CopyTo(new object[0], 0); Assert.IsNull(coll.Get("mono"), "Get(string)"); Assert.IsNull(coll["mono"], "this[string]"); try { Assert.IsNull(coll[0], "this[int]"); } catch (ArgumentOutOfRangeException) { // normal (can't avoid it) } try { Assert.IsNull(coll.GetKey(0), "GetKey(int)"); } catch (ArgumentOutOfRangeException) { // normal (can't avoid it) } try { Assert.IsNull(coll.Get(0), "Get(int)"); } catch (ArgumentOutOfRangeException) { // normal (can't avoid it) } }
public override void CopyTo(Array dest, int index) { _collection.CopyTo(dest, index); }