Not sure what issue you are having...
Notice anything different about those two results? We are trying to figure out the cause.
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
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.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
=)
To state the problem differently, why does the Listbox display the values differently using these two snippets?...
...since the ListBox calls ToString() on each Object in its Item collection, I would expect the two to produce the same result:
Snippet A:
For LoopCount As Double = 1 To 2 Step 0.1
ListBox1.Items.Add(LoopCou
Next
Snippet B:
For LoopCount As Double = 1 To 2 Step 0.1
ListBox1.Items.Add(LoopCou
Next
It seems that every floating point type *except* decimal behaves this way, even 'Object' when inferred to be floating point (which is probably inferred to be a 'Single' in this context, though I am not sure). Very very odd.
For those wondering why I am bothering with this, take a read to what Idle showed me yesterday:
http://msdn.micr
Th
Business Accounts
Answer for Membership
by: FernandoSotoPosted on 2008-10-02 at 07:57:51ID: 22624856
Hi ladarling;
nt)
ged(ByVal sender As Object, _ ged
.SelectedI tem)
Not sure what issue you are having. I entered the code from your post and the results are shown below. When I selected an item I displayed its value as also shown below. Here is the code I used.
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
For LoopCount As Double = 1 To 2 Step 0.1
ListBox1.Items.Add(LoopCou
Next
End Sub
Private Sub ListBox1_SelectedValueChan
ByVal e As System.EventArgs) Handles ListBox1.SelectedValueChan
Console.WriteLine(ListBox1
End Sub
Fernando
Console output of Selected Items
ListBox1 Doubles Displayed