C # question

HiVarun

 

How do I display a decimal integer into a text box or label?

 

Here is my simple code:

 

Decimal TotalCost = 0;

 

TotalCost+=2.00M; 

 

I want to display TotalCost  as $ 2.00 in 

,Either 

lblTotal.Text or

TxtTotal.Text 

But I keep getting the following error.

Error  1              Cannot implicitly convert type 'decimal' to 'string'


Also how do I convert 2.00 as $ 2.00?

 

Thank You,

Celia

Other related posts: