954,168 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help with calculation

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

Edrog
Newbie Poster
1 post since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

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...

slavedogg
Newbie Poster
13 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You