Converting String input from currency type format to double

Converting String input from currency type format to double

Steps to do:

  1. Remove the dollar ($) sign from the currency

here is the tutorial…

eg:

  • Removing $ symbol from the Currency

Dim strCurrencyValue = “$3,500”
Dim strNewValue = strCurrencyValue.Replace(“$”, string.empty)

Dim strDbl = Double.Parse(strNewValue)

  • Changing Currency Symbol

Dim strCurrencyValue = “$3,500”
Dim strNewValue = strCurrencyValue.Replace(“$”, “INR “)

Advertisements

One thought on “Converting String input from currency type format to double

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s