Example #1
0
        private void GetProjectNames()
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("Name");
            var projectNames = _variableService.GetProjects();

            foreach (var name in projectNames)
            {
                DataRow row = dt.Rows.Add();
                row[0] = name;
            }

            comboBox1.ValueMember   = "Name";
            comboBox1.DisplayMember = "Name";
            comboBox1.DataSource    = dt;
        }