Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
how to store a decimal value in c# ?.
Pavan Bujji
7y
195
1
Reply
Hi frnds,
how to store the decimal value in c# ?.
for ex:
Var1=50
var2=3000
if i do the divison like below
(50/3000)
actually it returns 0.01666.
my code is : decimal percentage= (decimal)(var1/var2);
but it returns '0' only. But i want to store 0.01666 atleast 0.016.
How can I ?.
Thanks & Regards,
Pavan G.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to add css in .cshtml file
Virtual mail in asp .net