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.
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,
Best Regards,
BioPhysEngr http://blog.biophysengr.net
--
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
Bookmarks