private void Load() { var result = JSONWriter.Read <Config>(GlobalConfig.ConfigFile); if (!result.success) { return; } foreach (PropertyInfo info in result.element.GetType().GetProperties()) { info.SetValue(this, info.GetValue(result.element)); } }