I have an object I created in C#, lets call it "listBoxCustom".
I want to store listBoxCustom in my listbox object, and i have a number of listBoxCustom objects.
I want to display a given name that I set for each object in the listbox, but as of right now it is displaying "myProject.listBoxCustom" in the nodes of the listbox, for as many items as I have added.
What do I need to do such that it will display the correct name that I want? I am assuming I need to create a certain property of my object and the listbox will by default try and access this, I am just not sure what it is.
Please let me know if you need additional detail, and thank you in advance.
Simply override ToString method in your listBoxCustom class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With