I found out how to do it
here ; so this works:
string constring = Properties.Settings.Default.CPSDataConnection;
using (SqlConnection con = new SqlConnection(constring))
{
using (SqlCommand cmd = new SqlCommand("SELECT Unit FROM MasterUnits ORDER BY Unit", con))
{
cmd.CommandType = CommandType.Text;
using (SqlDataAdapter sda = new SqlDataAdapter(cmd))
{
DataTable dt = new DataTable();
sda.Fill(dt);
((ListBox)MemberListBox).DataSource = dt;
((ListBox)MemberListBox).DisplayMember = "Unit";
((ListBox)MemberListBox).ValueMember = "Unit";
}
}
}