Exemplo n.º 1
0
 public UtilsRegistryKey this[string name]
 {
     get
     {
         RegistryKey      key    = _parent.Open();
         UtilsRegistryKey newKey = new UtilsRegistryKey(_parent.Root, key, _parent.Path + "\\" + name);
         key.Close();
         return(newKey);
     }
 }
Exemplo n.º 2
0
        public void Delete()
        {
            RegistryKey key = _parent.Open(true);

            key.DeleteValue(_valueName);
            key.Close();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Foreach Enumerator
        /// </summary>
        /// <returns></returns>
        public IEnumerator GetEnumerator()
        {
            RegistryKey key = _parent.Open();

            string[] names = key.GetValueNames();
            names = SortArray(names);
            foreach (string item in names)
            {
                yield return(this[item]);
            }
            key.Close();
        }