I am developing a website in asp.net and have this problem:
string price = row["Price"].ToString();
string discount = row["Discount"].ToString();
This code is for taking data from a DataTable and it is working correctly. Both are floating point values(12,50.75…). In my program I want to subtract “discount” from “price” and assign the result to a new string. Suppose string price contains 50 and string discount contains 23.5, then I want 26.5 in the new string. How do I accomplish this?
You can you the below code: