DEV Community

[Comment from a deleted post]
Collapse
 
drewknab profile image
Drew Knab • Edited

Not sure what you're looking at doing, I'm assuming this is a WinForms app? It should go something like so:

public void myFunctionThatRunsOnLoad(object sender, EventArgs e)
{
    myComboBox.DataSource = myDictionary;
    myComboBox.DataValueField = "Key";
    myComboBox.DataTextField = "Value";
    myComboBox.DataBind();
}

If you can provide a little more detail or a code snippet of what you're looking to do it would help give you a more detailed answer.