How we can convert label text 400.0000 to 400.00
we want to convert label's text means lblvalue.text=400.0000 to lblvalue.text=400.00
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Kunal VaishyaRank #990 · 2K reputationPosted Apr 25, 2014, 11:10 PM EDT
Your can use Math.Round() for this.
Regards,
Kunal
sudheer kumarRank #6,677 · 259 reputationPosted Apr 25, 2014, 11:16 PM EDT
Kunal VaishyaRank #990 · 2K reputationPosted Apr 25, 2014, 11:25 PM EDT
String.Format("{0:.##}", value)
Kunal VaishyaRank #990 · 2K reputationPosted Apr 25, 2014, 11:27 PM EDT
Convert.ToDecimal(string.Format("{0:F2}", Value));VulpesRank #55 · 29.2K reputationPosted Apr 26, 2014, 2:52 AM EDT