Dictionary and listbox help, pls
ok, so i have a dictionary which stores <string,object> (a few values are given to the object, like path, title etc)and then i store them by strings in a listbox. My question is how do i search a dictionary(by clicking on a listbox) by its string and then find that object and lets say display its property title in a label.
Re: Dictionary and listbox help, pls
Suppose you have a dictionary named dict, then dict.ContainsKey("some key") will check for the existence of that key in the dictionary, dict["some key"] will retrieve the associated value (the object, in your case), and dict.TryGetValue(...) will combine these operations,