public bool Remove(String key)
        {
            table temp = temps.Find(x => x.Key == key);

            temps.Remove(temp);
            return(true);
        }
        // To enable client code to validate input
        // when accessing your indexer.

        public bool Add(String key, object value)
        {
            try
            {
                table t = new table();
                t.Key   = key;
                t.Value = value;
                temps.Add(t);

                return(true);
            }
            catch { return(false); }
        }
示例#3
0
        // To enable client code to validate input  
        // when accessing your indexer. 

        public bool Add(String key, object value)
        {
            try
            {
                table t = new table();
                t.Key = key;
                t.Value = value;
                temps.Add(t);

                return true;
            }
            catch { return false; }

        }