Display amount in crores in C# and VB.Net

Last Reply 2 months ago By dharmendr

Posted 2 months ago

I have amount like 985367122.00 so i just want to show it in 9.8 crore or Cr.

Posted 2 months ago

Hi iammann,

Check this example. Now please take its reference and correct your code.

C#

protected void Page_Load(object sender, EventArgs e)
{
    double amount = 985367122.00;
    if (amount >= 10000000)
    {
        Response.Write(Math.Round((amount / 10000000), 1) + " Cr.");
    }
}

VB.Net

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
    Dim amount As Double = 985367122.0
    If amount >= 10000000 Then
        Response.Write(Math.Round((amount / 10000000), 1) & " Cr.")
    End If
End Sub

Output

98.5 Cr.