knows about except me (and the rest of my team). What do you think you will see
when you drop down the combo box in the following app?
Public Class Form1
Protected Overrides Sub OnLoad(ByVal e As EventArgs)
Dim c As New C("Marco")
c.Value = "Polo"
Public Class C
Public Sub New(ByVal val As String)
Value = val
Public Overrides Function ToString() As String
Public Value As String
Well the title of this post gives it away; of course you see "Marco". The combo box caches the ToString results when the items are added. I have yet to find a way to tell it to update its cached strings, without removing and readding items.
I love the fact that you add objects to combos and other lists, but this behaviour just shows it up as something of a hack: we might as well still be storing strings and putting the object reference in ItemData.
This happens in VS.NET 2003 and 2005. My friends tell me Java has a much more sophisticated model with paging and everything. Come on Microsoft, time to catch up!