Jedhi Posted February 10, 2004 Posted February 10, 2004 I have a table consist of a key and a value. Where the key is the security number and the value is the name. I would like to pick out the value that belongs to the key, but how do I do this ??? Code: System.Collections.ICollection keys = table.Keys; foreach(string key in keys) { string[] myItems = new string[] { textBox1.Text = key, textBox2.Text = ?????? }; ListViewItem lvi = new ListViewItem(myItems); listView1.Items.Add(lvi); } Controls.Add(listView1); Quote
*Experts* Bucky Posted February 10, 2004 *Experts* Posted February 10, 2004 textBox2.Text = table.Item[key] Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Jedhi Posted February 11, 2004 Author Posted February 11, 2004 I understand you point. The problem is just that I can not do what you suggested. Not even values[key]. Any suggestion how to solve the problem ?? System.Collections.ICollection values = table.Values; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.