Microsoft.Win32.RegistryKey.GetValueNames C# (CSharp) Méthode

GetValueNames() public méthode

public GetValueNames ( ) : string[]
Résultat string[]
        public string[] GetValueNames() { throw null; }
        public static Microsoft.Win32.RegistryKey OpenBaseKey(Microsoft.Win32.RegistryHive hKey, Microsoft.Win32.RegistryView view) { throw null; }

Usage Example

 public void CopyFromRegistry(RegistryKey keyToSave)
 {
     if (keyToSave == null)
     {
         throw new ArgumentNullException("keyToSave");
     }
     this.ValueNames = keyToSave.GetValueNames();
     if (this.ValueNames == null)
     {
         this.ValueNames = new string[0];
     }
     this.Values = new object[this.ValueNames.Length];
     for (int i = 0; i < this.ValueNames.Length; i++)
     {
         this.Values[i] = keyToSave.GetValue(this.ValueNames[i]);
     }
     this.KeyNames = keyToSave.GetSubKeyNames();
     if (this.KeyNames == null)
     {
         this.KeyNames = new string[0];
     }
     this.Keys = new SerializableRegistryKey[this.KeyNames.Length];
     for (int j = 0; j < this.KeyNames.Length; j++)
     {
         this.Keys[j] = new SerializableRegistryKey(keyToSave.OpenSubKey(this.KeyNames[j]));
     }
 }
All Usage Examples Of Microsoft.Win32.RegistryKey::GetValueNames