private static void MigrateIntValues(RegistryKey source, RegistryKey target, params string[] propertyNames) { for (int i = 0; i < propertyNames.Length; i++) { target.SetValue(propertyNames[i], (int)source.GetValue(propertyNames[i], 0)); } }