Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
1.33/5 (2 votes)
See more:
in my project i want to do currency conversion,
if we want to convert $ to rupee and vice versa ,how to do it in code
there are 200 currencies like
from currency:dropdownlist
to currency:dropdownlist
plz give me a n idea about it like in datbasees which all i need to create like that,plz help me i am getting the correct thing for same currency in from and to
THANKS IN ADVANCE
Posted
Updated 13-Aug-17 3:47am

 
Share this answer
 
Comments
Mehdi Gholam 28-Oct-11 2:39am    
my 5!
Uday P.Singh 28-Oct-11 2:43am    
thanks Mehdi :)
satishmachineni 28-Oct-11 5:40am    
thank you
C#
Dictionary<string,decimal> rates = new Dictionary<string,decimal>();
rates.Add("dollortorupee", 2.0);
rates.Add("rupeetodollor", 0.5);



decimal converted = moneyvalue * rates["dollortorupee"];
 
Share this answer
 
Comments
satishmachineni 28-Oct-11 5:41am    
thanks alot
Mehdi Gholam 28-Oct-11 5:51am    
no problem
Maintaining Currency Conversion information in Database isn't a good idea. Because Currency Rates are so volatile.

Instead use "Currency Conversion" Web Service.

Here are few of them.
http://fx.cloanto.com/webservices/CurrencyServer.asmx

http://www.webservicex.com/CurrencyConvertor.asmx

http://www.xmethods.net/ve2/ViewListing.po?key=uuid:FCCF6690-E981-1C51-09D2-36CA5D4BD7AA
 
Share this answer
 
Comments
satishmachineni 28-Oct-11 4:15am    
thanks for ur reply, but i have to do it as project in my college
satishmachineni 28-Oct-11 5:41am    
thank you
RaisKazi 28-Oct-11 6:14am    
Weilcome. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900