public ITransientAssociative assoc(object key, object val) { if (Util.IsIntegerType(key.GetType())) { int i = Util.ConvertToInt(key); return(assocN(i, val)); } throw new ArgumentException("Key must be integer"); }
public object valAt(object key, object notFound) { EnsureEditable(); if (Util.IsIntegerType(key.GetType())) { int i = Util.ConvertToInt(key); if (i >= 0 && i < count()) { return(nth(i)); } } return(notFound); }