Beispiel #1
0
 public bool RemoveKey(IniKey key)
 {
     if (key != null)
     {
         try
         {
             _mKeys.Remove(key.Name);
             return(true);
         }
         catch (Exception ex)
         {
             Trace.WriteLine(ex.Message);
         }
     }
     return(false);
 }
Beispiel #2
0
        public IniKey AddKey(string sKey)
        {
            sKey = sKey.Trim();
            IniKey k = null;

            if (sKey.Length != 0)
            {
                if (!_mKeys.ContainsKey(sKey))
                {
                    k            = new IniKey(sKey);
                    _mKeys[sKey] = k;
                }
                else
                {
                    k = _mKeys[sKey];
                }
            }
            return(k);
        }