Link to home
Start Free TrialLog in
Avatar of Bruce
BruceFlag for United States of America

asked on

How can I use the type of a DataSet Table Column instead of converting it to a string first then back to a number?

I have a numeric column in a table in a dataset.  I want use that column data in an equation without pulling the value out into a local decimal.

decimal amount = decimal.Parse(segDS.Tables[0].Rows[0]["Annuity_Issued_Period"].ToString()) + decimal.Parse(lifeFitDS.Tables[0].Rows[0]["Annuity_Issued_Period"].ToString());

Open in new window


I'd prefer not to so do decimal.Parse on a ToString if I don't have to.
ASKER CERTIFIED SOLUTION
Avatar of Snarf0001
Snarf0001
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial