469,579 Members | 1,157 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

Convert integer to decimal in vb.net

karthickbabu
Hi

In my application i want to convert integer to decimal. I get a input and using convert function to convert into decimal. But it shows as it self. My code like as below, Is any wrong in my code

dim input as long // I declare as long
dim decimaloutput as decimal

decimaloutput = Convert.ToDecimal(input)
label1.text = decimaloutput.ToString()


Sample output : 24

Decimal of 24 is 24

Is it correct or How can it display the output


Hope your reply
Nov 23 '07 #1
2 14690
Shashi Sadasivan
1,435 Expert 1GB
Hi that is the correct way to convert it to a decimal.
Were you expecting something else to be printed out?
Nov 23 '07 #2
Hi Sorry little bit i confused. Then sit back and think My output is correct

Thanks for your reply

Hi that is the correct way to convert it to a decimal.
Were you expecting something else to be printed out?
Nov 26 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Sam Smith | last post: by
7 posts views Thread by Philipp H. Mohr | last post: by
3 posts views Thread by Gospill | last post: by
7 posts views Thread by elliotng.ee | last post: by
6 posts views Thread by sweeet_addiction16 | last post: by
10 posts views Thread by cmdolcet69 | last post: by
1 post views Thread by =?Utf-8?B?dHZpbg==?= | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.