"james" <(E-Mail Removed)> wrote:
> I declared a class with 4 string properties, one of which overrides the
> "toString()" method.
> I add objects based on this to a combobox, and I can see the properties if I
> pause execution and look at the "SelectedItem" I can see my
> properties/values in the debugger, but if I try it in the code I can only
> see the Equals, GetHashCode, GetType and ToString methods.
>
> How can I access the other properties I defined?
You need to typecast the SelectedItem value to your class:
((YourClassNameHere) comboBox.SelectedItem).YourPropertyHere
or
YourClassNameHere value = (YourClassNameHere) comboBox.SelectedItem;
// work with value
-- Barry
--
http://barrkel.blogspot.com/