using Components; using Components.Object; namespace WinFormsTest { public partial class Form1 : Form { public Form1() { InitializeComponent(); InitializeListBox(); InitializeDataGridView(); } private void InitializeListBox() { customListBox.SetItems(new List { "Hi 1", "Hi 2", "Hi 3", "Hi 4", "Hi 5", }); } private void InitializeDataGridView() { var columns = new List<(string HeaderText, string DataPropertyName, float FillWeight)> { ("Имя", "Name", 1), ("Возраст", "Age", 1), ("Email", "Email", 2) }; customDataGridView1.ConfigureColumns(columns); var data = new List { new Person ("Иван", 30, "ivan@gmail.com" ), new Person ("Мария", 25, "maria@gmail.com") }; customDataGridView1.FillData(data); } } }