private void buttonSave_Click(object sender, EventArgs e) { List <Setting> settings = new List <Setting>(); foreach (Control c in tableLayoutPanel.Controls) { string control = c.GetType().Name; if (control == "AutoSizeTextBox") { settings.Add(new Setting { Name = c.Name, Value = c.Text }); } } DataGetSet.SaveParameters(settings); }