Member_2_4426104
asked on
help formating double
Hi,
I have the below code.
How do I format the p.value so its stays a double and can be sorted in my listview but shows:
$#,##.##
Thanks
T
I have the below code.
How do I format the p.value so its stays a double and can be sorted in my listview but shows:
$#,##.##
Thanks
T
Function getPrice(ByVal query As XElement, ByVal vehicleValue As String) As Double
Dim priceResult = From p In query...<price> _
Where p.@vehicle = vehicleValue _
Select Double.Parse(p.Value)
Return priceResult.FirstOrDefault()
End Function
tubbs is right. Sorting numbers continues to be harder than it should be. Take a look at this article on ICompare.
http://madebits.com/articles/numsort/index.php
http://madebits.com/articles/numsort/index.php
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Wayne