c# - TreeView. US States and Cities -


I have found a list view and I have to fill it with states as root nodes, Nodes in the form. This is a difficult task.

I have a dictionary & lt; String, list & lt; String & gt; & Gt; and by doing so.

  dictionaries & lt; String, list & lt; String & gt; & Gt; Location = New Dictionary & lt; String, list & lt; String & gt; & Gt; (); & Lt; String & gt; Alabama = new list & lt; String & gt; (); Alabama.add ("city1"); Alabama.add ("city2"); Alabama.add ("city3"); .... places.ed ("Alabama", Alabama); ....  

By doing this every state and city is getting disturbed, and I can not help only, but it seems that there is an easy way.

Any thoughts? <

By using arrays instead of syntax and lists, the number of keystrokes reduces:

  var location = new dictionary & lt; String, string []> {{"Alabama", New [] ("City 1", "City 2", "City 3", ...}}, ...}  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -