Hi.,
i need to make following in vb.net
I want to make the decimal type s=1 to be diaplyed with 1.00
if i give s=1.00 it takes as such ., but if i give s=1 ., it not providing as 1.00..
Convertion of decimal to appropriate format
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Datta KharadRank #2,135 · 668 reputationPosted Nov 17, 2011, 8:54 PM EST
You need to take datatype as Double or float, see below example:
double dc = Convert.ToDouble(textBox1.Text);
float ft = Convert.ToSingle(textBox2.Text);
If Enter number in TextBox1=2 and TextBox2 =3:
Output is 2.0 and 3.0
Karthik AgarwalRank #2,270 · 620 reputationPosted Nov 17, 2011, 8:42 PM EST
Console::Write("{0:f2} ", (flaot)val);
Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 17, 2011, 8:43 PM EST
Please refer the below link
http://idealprogrammer.com/net-languages/code-samples/cdec-syntax-vbnet-aspnet-cdec-source-code/
Thanks
VulpesRank #55 · 29.2K reputationPosted Nov 17, 2011, 11:49 PM EST
The code in VB.NET would be something like this: