如何从与 linq 的组合框绑定中获取 valuemember
cmb_projectName.DataSource = linq1.tbl_Projects.Select(c => new {c.ID,c.ProjectName }).ToList();
int projectID = Convert.ToInt32( cmb_projectName.SelectedValue);
cmb_projectName.DisplayMember = "项目名称"; cmb_projectName.ValueMember = "ID";
cmb_projectName.SelectedValue ==> return {ID = 1, ProjectName = "projectname1" }
我想返回 Just ID 值;
有什么问题 ??!!