I am working on a Time Converter, which has 2 Comboboxes, To and From.
Both Combobox has a BIG list of about 20K+ of countries and cities name.
This list is hard coded in the Code itself, and I'm using this code:
this.comboBox_TO.Items.AddRange(new object[]
{
"Afghanistan, Kabul",
//List
}
this.comboBox_FROM.Items.AddRange(new object[]
{
"Afghanistan, Kabul",
//List
}
The issue here is this code takes a lot of time to add the BIG list into Combobox and resets everytime time converter is closed. So, next time I reopen Time converter, it takes lots of time again.
I need the help in either,
- Fastest way to add list into Combobox Items, OR
- Stop Combobox resetting everytime converter is reopened.
Thanks in advance.