ladarling
asked on
ListBox Control's Intrinsic Conversion from Double to Object Problem
Ok crowd, here is the issue. Idle_Mind and I have been dealing with another authors problem, and we have come across an interesting issue with the ListBox control. If you use the Add() method of the list box control on a Double, the lisbox's conversion from Double to Object widens the Double as expected, but unexpectedly returns junk data. To see this for yourself, add a listbox to a forn and try:
For LoopCount As Double = 1 To 2 Step 0.1
ListBox1.Items.Add(LoopCou nt)
Next
NOTE: I'm not looking for a workaround, there are any number of ways around it. This is just an academic discussion about the object itself and what the problem is or may be. If you think you know, there are points in it for you.
For LoopCount As Double = 1 To 2 Step 0.1
ListBox1.Items.Add(LoopCou
Next
NOTE: I'm not looking for a workaround, there are any number of ways around it. This is just an academic discussion about the object itself and what the problem is or may be. If you think you know, there are points in it for you.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What I meant to say:
(which is probably inferred to be a 'Double' in this context, though I am not sure)
It is apparently treated as a double judging from the output, but I am willing to believe anything at this point :-)
(which is probably inferred to be a 'Double' in this context, though I am not sure)
It is apparently treated as a double judging from the output, but I am willing to believe anything at this point :-)
ASKER
For those wondering why I am bothering with this, take a read to what Idle showed me yesterday:
http://msdn.microsoft.com/
The screenshot below shows the different types I played with....
sshot.png