Advertisement

03.08.2007 at 12:03PM PST, ID: 22437368
[x]
Attachment Details

Convert string into decimal C#

Asked by pratikshahse in Microsoft Visual C#.Net

Tags: decimal, string, convert

Convert string value into decimal.

string strNewRefundAmt = "$54";
decimal curNewRefundAmt = 0;

if I do

curNewRefundAmt = Convert.ToDecimal(strNewRefundAmt))

i get an exception saying "Input not valid" . I have tried Convert.ToInt32,Convert.ToDouble and I get the same error. What should I do so that
curNewRefundAmt =  57

comes up.

Thank You

Start Free Trial
[+][-]03.08.2007 at 12:24PM PST, ID: 18682378

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.08.2007 at 12:31PM PST, ID: 18682444

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.08.2007 at 12:32PM PST, ID: 18682459

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.08.2007 at 12:36PM PST, ID: 18682494

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.08.2007 at 01:14PM PST, ID: 18682871

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual C#.Net
Tags: decimal, string, convert
Sign Up Now!
Solution Provided By: dstanley9
Participating Experts: 3
Solution Grade: A
 
 
[+][-]03.08.2007 at 01:16PM PST, ID: 18682888

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32