Why is my winforms combobox showing the name of the objects rather than the display member that I specify?

As per the comments above, the issue is due to the fact that "VegasCourseName" has been written as a field, not a property. Therefore, the ToString implementation has been shown instead.

As per the comments above, the issue is due to the fact that "VegasCourseName" has been written as a field, not a property. Therefore, the ToString implementation has been shown instead. Use a property instead: class VegasPegasusCourseObject { public string VegasCourseName { get; set;} }.

You have no idea how much I've learned just now. – Ryan Nov 15 at 3:13.

From the docs for DisplayMember: If the specified property does not exist on the object or the value of DisplayMember is an empty string (""), the results of the object's ToString method are displayed instead. You do not have a property named "VegasCourseName" in VegasPegasusCourseObject and are getting the ClassName (the default implementation of ToString()) instead.

Override ToString() method of VegasPegasusCourseObject class.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions