944,198 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 4125
  • VB.NET RSS
Nov 3rd, 2004
0

Help with calculation

Expand Post »
Hi I need alittle help. I am doing a VB.Net class and I am having trouble with code for calculating. I dont know hoe to do the code for it. I have to have a calculation for Original Price, Discount rate and New Price. Plus I dont know how to display dollar signs or two decimal places in the new and discount price amounts. Can someone help me.
Thanks, Ed
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Edrog is offline Offline
1 posts
since Nov 2004
Feb 27th, 2008
0

Re: Help with calculation

To do calculations I would need more info, but to add a $ and two decimal you must format the output.

dim UnitPrice as Double = 9.99
lableTotal.text=String.Format("{0:c}", UnitPrice)

This will display $9.99

Hope this helps...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
slavedogg is offline Offline
13 posts
since Sep 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Server.mappath is not valid..
Next Thread in VB.NET Forum Timeline: Database is not updating but no errors :(





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC