0

Im Trying to get my list in to a combobox by using the following code

        List<string> Regions = new List<string>();
        Regions.Add("EU");
        Regions.Add("NA");
        Regions.Add("KR");
        Combobox1.DataSource = Regions;

This didn't work when I started the program. I also tried using a foreach like this

        foreach (var Region in Regions)
        {
            Combobox1.Items.Add(Region);
        }

Does someone now how to do this,

Thanks

  • Possible duplicate of [how to bind a list to a combobox? (Winforms)](http://stackoverflow.com/questions/600869/how-to-bind-a-list-to-a-combobox-winforms) – cbr Jan 07 '17 at 14:12
  • Thanks for commenting I made a mistake in the placement, sorry im a noob – Daan Robben Jan 07 '17 at 14:14
  • Glad to hear you found the cause! Stepping through your code and observing the values of variables really helps in cases like these :) If you're not familiar with stepping through your code, check out [this Microsoft guide](https://msdn.microsoft.com/en-us/library/y740d9d3.aspx). – cbr Jan 07 '17 at 14:21

0 Answers0