public bool Remove(string key) { _ItemBase item = Array.Find(s_items, x => x.key == key); if (item == null) { return(false); } item.SetValue(this, null); return(true); }
public object this[string key] { get { _ItemBase item = Array.Find(s_items, x => x.key == key); if (item == null) { return(null); } return(item.GetValue(this)); } set { _ItemBase item = Array.Find(s_items, x => x.key == key); if (item == null) { throw new Exception("not have such key " + key); } item.SetValue(this, value); } }